15.01.2013, 14:15
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;
}
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.