02.10.2011, 08:22
pawn Код:
dcmd_changeakey(playerid, params[])
{
new key, string[126];
if(!(PlayerInfo[playerid][pAdmin] >= 1)) return 0;
if(sscanf(params, "i", key)) return SendClientMessage(playerid, COLOR_GREY, "* Usuage: /changeakey [4 digits]");
if(key > 9999 || key < 1000) return SendClientMessage(playerid, COLOR_LIGHTRED, "* Your security key must be 4 digits long only !");
PlayerInfo[playerid][pSecKey] = key;
format(string, sizeof(string), "* Security key changed to: %d !", key);
SendClientMessage(playerid, COLOR_GREY, string);
return 1;
}