03.06.2012, 00:04
Quote:
|
Awesome, Jonny that worked.
Any idea how I could modify what ive done so that my global messages saying a player is using godmode/isnt using godmode can be changed to display the actual players name instead of just the word player? Sorry, I'll delete my post there :C |
pawn Код:
#define INFINITY (Float:0x7F800000)
new GodMode[MAX_PLAYERS];
CMD:godmode(playerid, params[])
{
if(GodMode[playerid] == 0) //god mode not set, lets set it
{
SetPlayerHealth(playerid, INFINITY); //set the health to infinity
GodMode[playerid] = 1; //set godmode to true
SendClientMessageToAll(COLOR_RED, " An Admin is now in god mode!");
}
else if(GodMode[playerid] == 1) //god mode set .. lets unset it
{
SetPlayerHealth(playerid, 100.0); //set health to 100%
GodMode[playerid] = 0; //set godmode to false
SendClientMessageToAll(COLOR_RED, "An Admin is now in god mode!");
}
return 1;
}


