Kick command stopped working after 0.3x update?
#1

pawn Код:
CMD:kick(playerid, params[])
{
    if(LoggedIn[playerid] == 0) return SendClientMessage(playerid, COLOUR_GREY, "You must be logged in to use this command.");
   
    new reason[128], giveplayerid;
    if(AdminLevel[playerid] < 1) return SendClientMessage(playerid, COLOUR_GREY, "You are not authorized to use this command.");
    if(sscanf(params, "us[128]", giveplayerid, reason)) return SendClientMessage(playerid, COLOUR_GREY, "Usage: /kick [player id] [reason]");
    if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COLOUR_GREY, "That player is not connected.");
   
    format(reason, sizeof(reason), "Admin %s Kicked %s [Reason: %s ]", GetNameEx(playerid), GetNameEx(giveplayerid), reason);
    SendClientMessageToAll(COLOUR_REALRED, reason);
    Kick(giveplayerid);
    return 1;
}
Can someone please explain why? Every command that I use the Kick(); Function in, doesn't display any of the client messages I'm trying to send, worked before I updated and suddenly they don't.
Reply
#2

The code above should work fine. Did you update your plugins?
Reply
#3

Apparently, the Kick() needs a timer to delay, something to do with security issues.
Reply
#4

Caused by 0.3x security improvements.. Kick() being related to security is another story.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)