30.07.2011, 08:55
Quote:
Originally Posted by Someone
SetPlayerHealth(playerid, 10000000);
|
Better do it like:
pawn Код:
#define INFINITY 10000000 //This goes to top of script
CMD:god(playerid, params[]) //Defining the command name (requires ZCMD)
{
if(IsPlayerAdmin(playerid)) //Checking if player is RCON admin
{
SetPlayerHealth(playerid, INFINITY); //Setting health to defined amount
SetPlayerArmour(playerid, INFINITY); //Setting armour to defined amount
}
else //If he is NOT RCON admin
{
SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that command!"); //Sends a message to the player
}
return 1; //Tells the compiler that it compiled successfully
}