Would this work?
#1

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?
Reply
#2

pawn Код:
new Float:pHP;

GetPlayerHealth( playerid, fHP );
pHP , fHP . Is this correct?
Reply
#3

No it's not it should be pHP
Reply
#4

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 );
Reply
#5

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
Reply
#6

I don't see anything changed? It does the same thing.
Reply
#7

On your code i didn't knew where "{" is needed but in my code i'ts not needed.
And you see i've added
Код:
*then
Reply
#8

What *then does?
Reply
#9

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
Reply
#10

His doesn't need any brackets either
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)