SendClientMessage on /kick doesn't work
#1

Upon banning a player it crashes the server/closing the rcon and I don't know the issue.

Код:
[23:14:15] {6a696a}[cmd]: /ban {9c9a9c}<playerid/name> [reason]
[23:14:16] <Whiskey> (0) .
[23:14:16] <Whiskey> .
[23:14:20] {E0E0E0}You are no longer protected against spawn-killing.
[23:14:36] Lost connection to the server. Reconnecting..
[23:14:36] The server is restarting..
[23:14:36] Connecting to 192.168.1.72:7777...
Код:
CMD:ban(playerid, params[])
{
    new targetid;
    new reason;
    new string[200];
    new ip[50];
    GetPlayerIp(targetid, ip, 50);
    if(pInfo[playerid][Adminlevel] < 3) return SendClientMessage(playerid, COLOR_RED, "{ff6347}Error: You are not allowed to use this command!");
    if(sscanf(params, "us[50]", targetid, reason))return SendClientMessage(playerid, COLOR_GREY, "{6a696a}[cmd]: /ban {9c9a9c}<playerid/name> [reason]");
    if(!IsPlayerConnected(targetid))return SendClientMessage(playerid, COLOR_RED, "{ff6347}Error: Player not found!");
    format(string, sizeof string, "{FF0000}[Admin] {FF6347}%s(%d) has banned %s(%d). Reason: %s", GetName(playerid), playerid, GetName(targetid), targetid, reason);
	SendClientMessageToAll(COLOR_YELLOW, string);
	SendClientMessage(targetid, COLOR_GREY, "  ");
	SendClientMessage(targetid, COLOR_WHITE, "> BANNED FROM {A10000}BLOODS {FFFFFF} VS {000096}CRIPS");
	SendClientMessage(targetid, COLOR_GREY, "``````````````````````````````````````````````````````````````````");
	format(string, sizeof(string), " > {31AA31}Name{E5E5E5}: %s", GetName(targetid));
	SendClientMessage(targetid, COLOR_GREEN, string);
	format(string, sizeof(string), " > {31AA31}Banned By{E5E5E5}: %s", GetName(playerid));
	SendClientMessage(targetid, COLOR_GREEN, string);
	format(string, sizeof(string), " > {31AA31}Reason{E5E5E5}: %s", reason);
    SendClientMessage(targetid, COLOR_GREEN, string);
    SendClientMessage(targetid, COLOR_GREY, "  ");
    SendClientMessage(targetid, COLOR_WHITE, "You {F7CE00}must {FFFFFF}take a screen-shot {F7CE00}(F8) {FFFFFF}for your ban appeal");
    SendClientMessage(targetid, COLOR_GREY, "``````````````````````````````````````````````````````````````````");
    GameTextForPlayer(targetid,"~r~Banned",9000,0);
	SetTimerEx("PauseBan", 1000, false, "d", playerid);
	new message2[125];
	format(message2, sizeof(message2), "banip %s",ip);
	SendRconCommand(message2);
    return 1;
}
Reply


Messages In This Thread
Bug: /ban is crashing the server/rcon - by Zmith - 17.05.2015, 21:41
Re: SendClientMessage on /kick doesn't work - by Konstantinos - 17.05.2015, 21:44
Re: SendClientMessage on /kick doesn't work - by Zmith - 17.05.2015, 22:08
Re: SendClientMessage on /kick doesn't work - by Konstantinos - 17.05.2015, 22:13
Re: SendClientMessage on /kick doesn't work - by Zmith - 18.05.2015, 01:19

Forum Jump:


Users browsing this thread: 1 Guest(s)