AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved/Old Plugins (https://forums.alliedmods.net/forumdisplay.php?f=27)
-   -   Breathe Under Water (https://forums.alliedmods.net/showthread.php?t=50198)

Locks 01-21-2007 14:39

Breathe Under Water
 
2 Attachment(s)
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

Hawk552 01-21-2007 15:00

Re: Breathe Under Water
 
use get_players, and merge the two if blocks into one statement so there's only 1 jump instead of 2

Locks 01-21-2007 15:13

Re: Breathe Under Water
 
Got it.

Hawk552 01-21-2007 15:16

Re: Breathe Under Water
 
No, you didn't, in fact it's actually worse (far worse) now.

I said to use get_players, not get_maxplayers.

Locks 01-21-2007 15:32

Re: Breathe Under Water
 
There, I hope I got it this time.

VEN 01-21-2007 15:42

Re: Breathe Under Water
 
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.

SweatyBanana 01-21-2007 15:45

Re: Breathe Under Water
 
Wouldn't it be:

Code:

iPlayers[i]
In the loop?

VEN 01-21-2007 15:48

Re: Breathe Under Water
 
Yes, though this doesn't fixes another issue. Better let him learn instead of fixing his mistakes.

Locks 01-21-2007 20:17

Re: Breathe Under Water
 
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.

VEN 01-22-2007 05:22

Re: Breathe Under Water
 
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


All times are GMT -4. The time now is 20:23.

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