01.01.2011, 14:23
pawn Код:
pGod[MAX_PLAYERS];
pawn Код:
dcmd_god(playerid, params[])
{
if(level[playerid] >= 1) SendClientMessage(playerid, White, "SERVER: Unknown command.");
else
{
if(sscanf(params, "u", params)) return SendClientMessage(playerid, 0xF97804FF, "Usage: /god 1/0");
if(strcmp(params, "0", true)==0)
{
SetPlayerHealth(playerid, 100);
pGod[playerid] = 0;
}
else if(strcmp(params, "1", true)==0)
{
SetPlayerHealth(playerid, 10000);
pGod[playerid] = 1;
}
}
return 1;
}