Anti_Speed problem
#1

so look it doesent work i put an hack on my server to see and it doesent appear message and doesent kick me..the server restarts..

PHP код:
#define Name:%1(%2) forward %1(%2); public %1(%2) 
PHP код:
Name:Antisp(playerid)
                    {
                       if(
GetPlayerSpeed(playerid) > 210)  // if it is above.
                       
{
                         
SendClientMessage(playerid, -1"<< Anti-Speed: %s a primit Kick de la Anti-Speed >>");  // will be displayed this message
                         
Kick(playerid); // Then will kick the player.
                       
}
                       return 
1;
                    } 
help please!
Reply
#2

anyone?
Reply
#3

show your "GetPlayerSpeed" function
Reply
#4

pawn Код:
Name:Antisp(playerid)
{
    if(GetPlayerSpeed(playerid) > 210)  // if it is above.
    {
        SendClientMessage(playerid, -1, "<< Anti-Speed: You are kicked >>");  // will be displayed this message
        Kick(playerid); // Then will kick the player.
    }
    return 1;
}
Reply
#5

pawn Код:
public OnGameModeInit()
{
    SetTimer("Antisp", 2000, 1);
    return 1;
}

forward Antisp();
public Antisp()
{
    for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
    {
        if(GetPlayerSpeed(playerid) > 210)  // if it is above.
        {
            SendClientMessage(playerid, -1, "<< Anti-Speed: You are kicked >>");  // will be displayed this message
            Kick(playerid); // Then will kick the player.
        }
    }

    return 1;
}
Reply
#6

Quote:
Originally Posted by SuperViper
Посмотреть сообщение
pawn Код:
public OnGameModeInit()
{
    SetTimer("Antisp", 2000, 1);
    return 1;
}

forward Antisp();
public Antisp()
{
    for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
    {
        if(GetPlayerSpeed(playerid) > 210)  // if it is above.
        {
            SendClientMessage(playerid, -1, "<< Anti-Speed: You are kicked >>");  // will be displayed this message
            Kick(playerid); // Then will kick the player.
        }
    }

    return 1;
}
no message the server restarts!
Reply
#7

Use the IsPlayerConnected function before checking speed.
Reply
#8

Try this
pawn Код:
public OnPlayerUpdate(playerid)
{
   if(GetPlayerSpeed(playerid) > 210)
   {
     SendClientMessage(playerid, 0xFF0000, "Anti-Speed:You're kicked for high speed.");
     Kick(playerid);
   }
   return 1;
}
Not Tested.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)