Flood
#4

pawn Код:
public OnPlayerUpdate(playerid)
{
    if(GetPlayerSpeed(playerid) > 270)
    {
        TogglePlayerControllable(playerid,0);
        new name[MAX_PLAYER_NAME+1], string[24+MAX_PLAYER_NAME+1];
        GetPlayerName(playerid, name, sizeof(name));
        format(string, sizeof(string), "%s Važiavo didesniu nei 270 km/h greičiu. /stebeti %s", name, name);
        for(new i=0; i<MAX_PLAYERS; i++) if(PlayerInfo[i][pAdmin] == 1) SendClientMessage(i, -1, string);
    }
    return 1;
}
This way it should work.
I suppose you want that admins see the message when a player exceeds the speed. That's why I added the loop, else only the player who exceeds the limit will get the message.
Reply


Messages In This Thread
Flood - by Louris - 15.01.2013, 14:08
Re: Flood - by ]Rafaellos[ - 15.01.2013, 14:14
Re: Flood - by Louris - 15.01.2013, 14:15
Re: Flood - by Jeffry - 15.01.2013, 14:15
Re: Flood - by Louris - 15.01.2013, 14:20

Forum Jump:


Users browsing this thread: 1 Guest(s)