04.05.2009, 10:40
Код:
if (strcmp(cmd, "/unlock", true)==0) { if((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >=3) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /unlock [PlayerName_PlayerLastName]"); return 1; } GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(giveplayer)); format(string, 256, "AdmWarning: %s has unlocked %s", sendername, tmp); ABroadCast(COLOR_ASKQ,string,1); format(string, 256, "AdmWarning: %s has unlocked %s", sendername, tmp); printf(string); format(string,sizeof(string),"%s.ini",tmp); fremove(string); SendClientMessage(playerid, COLOR_WHITE, "Player unlocked"); PlayerInfo[giveplayerid][pLocked] = 0; GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); } return 1; }