24.02.2013, 16:23
When an admin is kicking someone, it kicks the player that was typed in, but it says the admin's name..
"Administrator John Smith kicked John Smith"
Sever closed connection for Bob_Jones
Also, I need help on how to make it to where after it checks if the player ID that was entered is valid, it will also ask the administrator for the "Reason" for the kick and that will also show up on the Client message to all.
"Administrator John Smith kicked John Smith"
Sever closed connection for Bob_Jones
Also, I need help on how to make it to where after it checks if the player ID that was entered is valid, it will also ask the administrator for the "Reason" for the kick and that will also show up on the Client message to all.
pawn Код:
stock GetName2(id){
new name[24];
GetPlayerName(id,name,sizeof(name));
strreplace(name,'_',' ');
return name;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){
if(dialogid == 11) {
if(!response) return 0;
if(!IsPlayerConnected(strval(inputtext))) return ShowPlayerDialog(playerid,11,1,"Admin panel","Type in the ID of the player you wish to kick.\n{FF6347}Invalid player ID!","Submit", "Cancel");
ShowPlayerDialog(playerid,12,1,"Admin panel","Type in the reason to kick the player.","Submit", "Cancel");
new str[128],id;
format(str,sizeof(str),"%s %s kicked %s.",GetAdmin(playerid),GetName(playerid),GetName2(id));
KickMessage(strval(inputtext),str);
return 1;
}
}