26.11.2010, 19:07
Hey Guys,
I have had some problems with the /kick and ban command because everytime i get this:
http://s1180.photobucket.com/albums/...t=Kick-Ban.png
Here is the Ban code:
Kick Command:
If you need anymore bits of the script please ask.
Kind Regards
Tessar
I have had some problems with the /kick and ban command because everytime i get this:
http://s1180.photobucket.com/albums/...t=Kick-Ban.png
Here is the Ban code:
pawn Код:
dcmd_ban(playerid, params[])
{
if(IsAdmin[playerid] >= 1) {
new
id,
reason[24],
string[64];
if (sscanf(params, "us", id, reason)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/ban <playerid> <reason>\"");
else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found");
else if (id == playerid) SendClientMessage(playerid, COLOR_RED, "You cant ban your self. ");
else {
Ban(id);
format(string,sizeof(string),"%s has been ban from the server (REASON: %s)",ReturnPlayerName(playerid), reason );
SendClientMessageToAll(COLOR_YELLOW, string);
format(string,sizeof(string),"You have banned %s for %s.",ReturnPlayerName(playerid), reason );
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
else {
SendClientMessage(playerid, 0x00FF00AA, "Your not admin");
}
return 1;
}
pawn Код:
dcmd_kick(playerid, params[])
{
if(IsAdmin[playerid] >= 1) {
new
id,
reason[24],
string[64];
if (sscanf(params, "us", id, reason)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/kick <playerid> <reason>\"");
else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found");
else if (id == playerid) SendClientMessage(playerid, COLOR_RED, "You cant kick your self. ");
else {
Kick(id);
format(string,sizeof(string),"%s has been kicked from the server (REASON: %s)",ReturnPlayerName(playerid), reason );
SendClientMessageToAll(COLOR_YELLOW, string);
format(string,sizeof(string),"You have kicked %s for %s.",ReturnPlayerName(playerid), reason );
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
else {
SendClientMessage(playerid, 0x00FF00AA, "Your not a server admin");
}
return 1;
Kind Regards
Tessar