31.07.2011, 20:14
@Kingunit, After he just join the server, I guess.
Well, you can also have some fun with enums, and do something like this:
Do not use it "OnPlayerUpdate"
Try code that i provided above.
Well, you can also have some fun with enums, and do something like this:
pawn Код:
enum Blabla {
Loled
}
Trololol[MAX_PLAYERS][Blabla];
public OnPlayerConnect(playerid)
{
Trololol[playerid][Loled] = false
return 1;
}
CMD:explode(playerid, params[])
{
...
Trololol[playerid][Loled] = true;
return 1;
}
stock CheckIsGod(PlayerId)
{
new Float:HP;
GetPlayerHealth(PlayerId, HP); // Edited!
if(HP == 100 && Player[playerid][Loled])
return true;
else if(HP < 100)
return false;
return false;
}
Try code that i provided above.