27.06.2014, 20:50
I got a problem with the godmode.
The code seems to be alright, the only problem is that I can still die when I'm falling from a building. The health refills only after few seconds.
What is wrong?
pawn Код:
if (strcmp(cmd, "/godmode", true) == 0)
{
if (AccInfo[playerid][pVip] <=1)
{
if(AccInfo[playerid][God] == 0)
{
AccInfo[playerid][God] = 1;
SetPlayerHealth(playerid, 35000);
SendClientMessage(playerid,COLOR_GREEN, "* Godmode enabled.");
}
else
{
AccInfo[playerid][God] = 0;
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid,red,"* Godmode disabled.");
}
return PlayerPlaySound(playerid, 1052, 0.0, 0.0, 10.0);
}
else return SendClientMessage(playerid,COLOR_WHITE,"* You're not a VIP to perform this command.");
}
What is wrong?