Code Not Getting Executed Under OnPlayerUpdate
#1

Hey guys, I made this ping limiter, but the problem is it doesn't get executed. What's wrong?

pawn Code:
public OnPlayerUpdate(playerid)
{
    if(PingWarn[playerid] == 4)
    {
        print("it got called 1");
        new kickedname[24], string[240];
        GetPlayerName(playerid, kickedname, 24);
        format(string, sizeof(string), ""red"%s "orange"Has been kicked from the Server "lime"| "orange"Reason: Reaching maximum ping warns "lime"("red"5/5"lime") |", kickedname);
        SendClientMessageToAll(Yellow, string);
        Kick(playerid);
    }
    else if(GetPlayerPing(playerid) > ServerInfo[Ping])
    {
        print("it got called 2");
        PingWarn[playerid]++;
        new string[240], name[24];
        GetPlayerName(playerid, name, 24);
        format(string, sizeof(string), ""red"%s "orange"Has recived a Ping warning "lime"| Ping: "red"%i "lime"| "orange"Ping Limit: "red"%i "lime"| "orange"Warning "red"%i/5 "lime"|", name, GetPlayerPing(playerid), ServerInfo[Ping], PingWarn[playerid]);
        SendClientMessageToAll(Yellow, string);
    }
It didin't print "it got called 1" nor did it print "it got called 2", thanks for reading.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)