Would this work? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Would this work? (
/showthread.php?tid=337999)
Would this work? -
Marricio - 28.04.2012
pawn Код:
// OnPlayerTakeDamage
new Float:pHP;
GetPlayerHealth( playerid, fHP );
if( amount > 10 )
if( PlayerInfo[playerid][Admin] != 4 )
if( fHP+amount == fHP ) // Didn't receive any damage
printf("%d hacks", playerid );
Would it be efficient or something?
Re: Would this work? -
ViniBorn - 28.04.2012
pawn Код:
new Float:pHP;
GetPlayerHealth( playerid, fHP );
pHP , fHP . Is this correct?
Re: Would this work? -
Rudy_ - 28.04.2012
No it's not it should be pHP
Re: Would this work? -
Marricio - 28.04.2012
You guys are right.
This is the correct code:
pawn Код:
// OnPlayerTakeDamage
new Float:pHP;
GetPlayerHealth( playerid, pHP );
if( amount > 10 )
if( PlayerInfo[playerid][Admin] != 4 )
if( pHP+amount == pHP ) // Didn't receive any damage
printf("%d hacks", playerid );
Re: Would this work? -
Rudy_ - 28.04.2012
pawn Код:
// OnPlayerTakeDamage
new Float:pHP;
GetPlayerHealth( playerid, pHP );
if( amount > 10 ), if( PlayerInfo[playerid][Admin] != 4 ), if( pHP+amount == pHP )*then printf("%d hacks", playerid ); // Didn't receive any damage
try
Re: Would this work? -
Marricio - 28.04.2012
I don't see anything changed? It does the same thing.
Re: Would this work? -
Rudy_ - 28.04.2012
On your code i didn't knew where "{" is needed but in my code i'ts not needed.
And you see i've added
Re: Would this work? -
Marricio - 28.04.2012
What *then does?
Re: Would this work? -
Rudy_ - 28.04.2012
if the stats meet then it will printf
then is used simply like in english e.g "If i go to school "Then" get me a pencil" (Gay example) :P
Re: Would this work? -
[ABK]Antonio - 28.04.2012
His doesn't need any brackets either