29.10.2010, 14:40
I need a command were if your not in god mode, it puts you in god mode with 9999 armour and 9999 health.
If you do the command whilst in god mode, it sets you back to the normal 100 health.
I know the basic way of making the command: (use this and build on it if you can)
If you do the command whilst in god mode, it sets you back to the normal 100 health.
I know the basic way of making the command: (use this and build on it if you can)
pawn Code:
if(strcmp(cmd, "/god", true) == 0)
{
if(IsPlayerConnected(playerid))
{
SetPlayerHealth(playerid, 9999);
SetPlayerArmour(playerid, 9999);
new pname[MAX_PLAYER_NAME], string[40 + MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "[OPERATOR] %s has entered God Mode using /god", pname);
SendClientMessageToAll(0x3F9E4DAA, string);
}
return 1;
}