pawn Код:
// onplayerconnect
SetTimerEx("check_speed",500,true,"i",playerid);
forward check_speed(playerid);
public check_speed(playerid)
{
if (IsPlayerInRangeOfPoint(playerid, 20,1821.9,-1611.5,13.3) || IsPlayerInRangeOfPoint(playerid, 20,1821.6,-1747.4,13.3) || IsPlayerInRangeOfPoint(playerid, 20,1690.2,-1732.1,13.3) || IsPlayerInRangeOfPoint(playerid, 20,1689.0,-1592.3,13.37) || IsPlayerInRangeOfPoint(playerid, 20,1428.96,-1592.07,13.39) || IsPlayerInRangeOfPoint(playerid, 20,1429.64,-1731.93,13.38) || IsPlayerInRangeOfPoint(playerid, 20,1529.63,-1732.95,13.39))
{
if(IsPlayerConnected(playerid))
{
if(!IsPlayerInAnyVehicle(playerid))
{
new speed = GetPlayerSpeed(giveplayerid, true);
if(speed >= 121)
{
if(IsAPDMember(playerid) && PlayerInfo[playerid][pDBanned] == 0)
{
SendClientMessage(playerid, COLOR_GRAD1, "Check your speed");
}
if(IsAnFbi(playerid) && PlayerInfo[playerid][pDBanned] == 0)
{
SendClientMessage(playerid, COLOR_GRAD1, "Check your speed");
}
if(IsAnNg(playerid) && PlayerInfo[playerid][pDBanned] == 0)
{
SendClientMessage(playerid, COLOR_GRAD1, "Check your speed");
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Busted: You have been captured by a SpeedCamera");
{WantedPoints[giveplayerid]+= 2; }
}
}
}
}
return 1;
}