02.01.2012, 15:41
You don't need a cell of 256, it's just useless.
pawn Код:
if(strcmp(cmdtext, "/god", true) == 0) {
new string[128];
if(pAdmin[playerid] == 1) {
if(God[playerid] == 0) {
God[playerid] = 1;
SendClientMessage(playerid, COLOR_GREEN, "God Mode On");
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s is a God", name);
return SendClientMessageToAll(COLOR_BLUE, string);
}
else {
God[playerid] = 0;
SendClientMessage(playerid, COLOR_RED, "God Mode Off");
SetPlayerHealth(playerid, 100);
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s is a God no more", name);
return SendClientMessageToAll(COLOR_BLUE, string);
}
}
else return SendClientMessage(playerid,COLOR_RED,"You Are Not An Admin!);
}