17.10.2011, 13:44
PHP код:
COMMAND:adpil(playerid, params[]) {
new
string[128],
id,
plname[MAX_PLAYER_NAME],
newtext[41];
GetPlayerName(id, plname, sizeof(plname));
if(AdminLevel[playerid] != 1337) return 0;
if(sscanf(params, "u", id)) return SendClientMessage(playerid, -1, "USAGE: adpil [playerid]");
if(!IsPlayerConnected(id)) return 0;
if(PlayerLevel[id] == 200) return SendClientMessage(playerid, -1, "Player is already pilot");
format(string, sizeof(string), "Server Admin has made player %s a War Pilot.", pname);
SendClientMessageToAll(Blue, string);
SendClientMessage(id, Blue, "Server Admin has given you Pilot Status. You can now fly the Rustlers!");
IRC_Say(gGroupID, IRC_CHANNEL, string);
PlayerLevel[id] = 200;
TextDrawHideForPlayer(playerid, himessage);
format(string, sizeof(string), "Level:%d", PlayerLevel[playerid]);
TextDrawSetString(himessage, string);
TextDrawShowForPlayer(playerid, himessage);
return 1;
}