18.11.2014, 03:53
Quote:
|
That would attempt to create a dialog for each administrator, wouldn't it? (edit: Noticed you had a return; that will only show the first administrator it finds, yes?)
This might be sloppy written, but I'm in a bit of a hurry so here's something you can try, OP: pawn Код:
|
Kick Command:
pawn Код:
//Use this to start the timer to kick the player, thus showing the message before kicking them.
forward kickplayer(playerid);
public kickplayer(playerid)
{
Kick(playerid);
return 1;
}
CMD:kick(playerid,params[])
{
new id,string[128],PlayerName[MAX_PLAYER_NAME],TargetName[MAX_PLAYER_NAME],reason[100];//Added TargetName[MAX_PLAYER_NAME] to hold the name of the player (id).
if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, -1,"{FF0000}You are not authorized to use this command.");
if(sscanf(params,"us[100]",id,reason)) return SCM(playerid, -1,"{FF0000}/kick [ID] [reason]");
if(id == INVALID_PLAYER_ID || !IsPlayerConnected(id))) return SCM(playerid, -1,"{FF0000}Player is not connected.");
if(playerid == id) return SCM(playerid, -1,"{FF0000}You cannot kick yourself,fool");
GetPlayerName(playerid, PlayerName,sizeof(PlayerName));
GetPlayerName(id,TargetName,sizeof(TargetName));//Added this to get the name of the player kicked.
format(string,sizeof(string),"{FF0000}Player %s has been kicked by Admin %s for %s",TargetName,PlayerName,reason);
SendClientMessageToAll(COL_WHITE,string);
SetTimerEx("kickplayer", 1000, false, "i", id);//This is the timer used to kick the player so they will see the string above.
return 1;
}
//try this


