08.07.2010, 11:31
Hello. You need alot of sendclientmessages
i suggest you start by sending the player 30 messages like this
this is inside the kick command
And thats the player message, if you need help with the rest of the kick command i suggest you learn zcmd and sscanf if you dont know it by now.
Untested, but should work. There you go
i suggest you start by sending the player 30 messages like this
this is inside the kick command
pawn Код:
for(new i = 0; i < 30; i++)
{
SendClientMessage(playerid, 0xFFFF, " ");
}
SendClientMessage(playerid, 0xFF00AAFF, ".:- Kicked from SERVERNAME -:.");
SendClientMessage(playerid, 0xFF00AAFF, " ");
format(string, sizeof(string), " Admin: %s", ADMINNAMESTRING);
SendClientMessage(playerid, 0xFF00AAFF, string);
format(string, sizeof(string), " Reason: %s", REASONSTRING);
SendClientMessage(playerid, 0xFF00AAFF, string);
SendClientMessage(playerid, 0xFFFF, " ");
pawn Код:
CMD:kick(playerid, params[])
{
new id, reason[60], string[128], adminname[MAX_PLAYER_NAME], playername[MAX_PLAYER_NAME];
if(sscanf(params, "us", id, reason)) return SendClientMessage(playerid, 0xFFFFFF, "USAGE: /kick <ID> <REASON>");
else if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF00AAFF, "ERROR: Invalid playerid!");
else if(reason > 60) return SendClientMessage(playerid, 0xFF00AAFF, "ERROR: Reason is too long!");
else
{
for(new i = 0; i < 30; i++)
{
SendClientMessage(playerid, 0xFFFF, " ");
}
GetPlayerName(playerid, adminname, MAX_PLAYER_NAME);
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
SendClientMessage(playerid, 0xFF00AAFF, ".:- Kicked from SERVERNAME -:.");
SendClientMessage(playerid, 0xFF00AAFF, " ");
format(string, sizeof(string), " Admin: %s", adminname);
SendClientMessage(playerid, 0xFF00AAFF, string);
format(string, sizeof(string), " Reason: %s", reason);
SendClientMessage(playerid, 0xFF00AAFF, string);
SendClientMessage(playerid, 0xFFFF, " ");
Kick(id);
format(string, sizeof(string), "[ADMIN]: Administrator %s has kicked player %s [REASON: %s]", adminname, playername, reason);
SendClientMessageToAll(0xFF00AAFF, string);
}
return 1;
}