01.09.2009, 12:58
Quote:
Originally Posted by Jefff
Do U have on top commandtext
Код:
new cmd[128],idx,tmp[128]; cmd = strtok(cmdtext,idx); |
pawn Код:
dcmd_fakeban(playerid,params[])
{
if(!AccountInfo[playerid][AdminLevel]) return SendClientMessage(playerid,color,"You are not an admin.");
new
id,
reason[64],
pName[MAX_PLAYER_NAME],
pName2[MAX_PLAYER_NAME];
if(sscanf(params,"us",id,reason)) return SendClientMessage(playerid,color,"Usage: /fakeban [playerid/name] [reason]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,color,"That player ain't connected.");
GetPlayerName(playerid,pName,sizeof(pName));
GetPlayerName(id,pName2,sizeof(pName2));
printf("ADMIN: Admin %s kicked %s. Reason: %s",pName,pName2,reason);
format(string,sizeof(string),"-| Administrator %s banned %s. [Reason: %s ] |-",pName,pName2,reason);
SendClientMessageToAll(ADMIN_RED, string);
Kick(id);
KickLog(string);
return 1;
}