This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Breathe Under Water


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Fun Stuff       
Locks
Senior Member
Join Date: Sep 2005
Old 01-21-2007 , 14:39   Breathe Under Water
Reply With Quote #1

Breathe Under Water

Description
This plugin allows players to take no damage under water; in other words, they can now breathe under water.

Required Module
fakemeta
Attached Files
File Type: sma Get Plugin or Get Source (breathe_underwater.sma - 878 views - 563 Bytes)

Last edited by Locks; 01-22-2007 at 21:10.
Locks is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 01-21-2007 , 15:00   Re: Breathe Under Water
Reply With Quote #2

use get_players, and merge the two if blocks into one statement so there's only 1 jump instead of 2
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Locks
Senior Member
Join Date: Sep 2005
Old 01-21-2007 , 15:13   Re: Breathe Under Water
Reply With Quote #3

Got it.
Locks is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 01-21-2007 , 15:16   Re: Breathe Under Water
Reply With Quote #4

No, you didn't, in fact it's actually worse (far worse) now.

I said to use get_players, not get_maxplayers.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Locks
Senior Member
Join Date: Sep 2005
Old 01-21-2007 , 15:32   Re: Breathe Under Water
Reply With Quote #5

There, I hope I got it this time.
Locks is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 01-21-2007 , 15:42   Re: Breathe Under Water
Reply With Quote #6

Even so simple and at the same time still incorrect code.
Why, why you people not learn how to code first?
Learn how to deal with arrays.
VEN is offline
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 01-21-2007 , 15:45   Re: Breathe Under Water
Reply With Quote #7

Wouldn't it be:

Code:
iPlayers[i]
In the loop?
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
VEN
Veteran Member
Join Date: Jan 2005
Old 01-21-2007 , 15:48   Re: Breathe Under Water
Reply With Quote #8

Yes, though this doesn't fixes another issue. Better let him learn instead of fixing his mistakes.
VEN is offline
Locks
Senior Member
Join Date: Sep 2005
Old 01-21-2007 , 20:17   Re: Breathe Under Water
Reply With Quote #9

It would actually be helpful if you could just point out the issue. I've tested this plugin and it works fine without any problem.
Locks is offline
Old 01-22-2007, 01:32
Spive
This message has been deleted by s p l i t. Reason: spam
Old 01-22-2007, 01:47
Locks
This message has been deleted by s p l i t. Reason: irrelevant
VEN
Veteran Member
Join Date: Jan 2005
Old 01-22-2007 , 05:22   Re: Breathe Under Water
Reply With Quote #10

Open one of the sma files in the amxmodx/scripting folder and see how to loop through players[] array correctly.

But firstly i'd recommend to learn the Pawn array basics since you obviously is messing the meaning of "array element number" and "array element index".

Use these links for details:
http://wiki.amxmodx.org/index.php/Pawn_Tutorial
http://www.compuphase.com/pawn/pawn-lang.pdf
VEN is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:07.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode