forward trafilekap(playerid);SetTimer(\"trafilekap\", 1000, 1);new Float:Traffipax[4][3] ={{1931.7089,354.3225,20.7599}, {376.9446,120.6273,5.9113}, {784.4890,-165.7152,18.5214}, {1429.1204,34.3188,31.7118}};public trafilekap(playerid){if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER){for(new ii = 0; ii < sizeof Traffipax; ii++){ new ids = GetPlayerVehicleID(playerid); if(IsPlayerInRangeOfPoint(playerid, 40.0, Traffipax[ii][0], Traffipax[ii][1], Traffipax[ii][2]) && GetVehicleSpeed(ids) != 40) { SCM(playerid, COLOR_WHITE, \"Túl gyorsan hajtottál, ezért levontunk tőled 100 dollárt!\"); Kifizet(playerid, -100); }}}}
forward onTraffipaxShot();forward resetTraffipax();#define MAX_SPEED 50#define RESET 20 //másodpercSetTimer(\"onTraffipaxShot\", 1000, true);SetTimer(\"resetTraffipax\", RESET*1000, true);new bool:Elkapta[MAX_PLAYERS];new Float:Traffipax[5][3] ={{1931.7089,354.3225,20.7599}, {376.9446,120.6273,5.9113}, {784.4890,-165.7152,18.5214}, {1429.1204,34.3188,31.7118}};public resetTraffipax(){new i;i = -1;for(; i<MAX_PLAYERS; i++){if(Elkapta) Elkapta == false;}}public onTraffipaxShot(){new i;i = -1;for(; i<MAX_PLAYERS; i++){if(isPlayerNearTraffipax(i) && !Elkapta){ if(GetPlayerState(i) == PLAYER_STATE_DRIVER){ new vehid = GetPlayerVehicleID(i); if(GetVehicleSpeed(vehid) >= MAX_SPEED){ SCM(playerid, -1, \"Túl gyorsan hajtottál, ezért levontunk tőled 100 dollárt!\"); Kifizet(playerid, -100); } }}}return 1;}isPlayerNearTraffipax(playerid){new i, count;i = -1, count=0;for(; i<sizeof(Traffipax); i++){if(IsPlayerInRangeOfPoint(playerid, Traffipax[0],Traffipax[1],Traffipax[2])){ count++; break; return true;}else continue;}if(count == 0) return false;}