Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new bool:duzus[MAX_VEHICLES];
- stock IsPlayerNearPNS(playerid)
- {
- if(IsPlayerInRangeOfPoint(playerid,15,-1904.4613,284.3640,41.0469)) return 1; // pns wang
- if(IsPlayerInRangeOfPoint(playerid,15,2393.9219,1490.0908,10.6417)) return 1; // near casino
- if(IsPlayerInRangeOfPoint(playerid,15,1025.0333,-1024.4900,32.1016)) return 1; // tample
- if(IsPlayerInRangeOfPoint(playerid,15,487.4272,-1740.6165,11.1334)) return 1; // santa
- if(IsPlayerInRangeOfPoint(playerid,15,1976.1138,2162.2119,11.0703)) return 1; // red east
- if(IsPlayerInRangeOfPoint(playerid,15,-2425.7561,1021.0601,50.3977)) return 1; // juniper
- if(IsPlayerInRangeOfPoint(playerid,15,2064.3638,-1831.4796,13.5469)) return 1; // idlewood
- if(IsPlayerInRangeOfPoint(playerid,15,-100.0151,1117.9094,19.7417)) return 1; // FC
- if(IsPlayerInRangeOfPoint(playerid,15,-1420.4873,2584.8186,55.8433)) return 1; // El Quarabos
- if(IsPlayerInRangeOfPoint(playerid,15,719.9288,-458.2310,16.3359)) return 1; // El Quarabos
- return 0;
- }
- stock ACFix(playerid,vehicleid)
- {
- new Float:hp;
- GetVehicleHealth(vehicleid,hp);
- if(IsPlayerInVehicle(playerid,vehicleid) && hp < 999 && duzus[vehicleid]==false) duzus[vehicleid] = true;
- if(!IsPlayerInVehicle(playerid,vehicleid)) return 0;
- if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return 0;
- if(duzus[vehicleid]==false) return 0;
- if(hp != 1000) return 0;
- if(IsPlayerNearPNS(playerid)) return 0;
- duzus[vehicleid]=false;
- SetTimerEx("KickFixer",500,0,"i",playerid);
- return 1;
- }
- forward KickFixer(playerid);
- public KickFixer(playerid)
- {
- new zin[114],name[21];
- GetPlayerName(playerid,name,21);
- format(zin,114,"[KICK] %s išmestas iš serverio dėl nelegalių programų naudojimo (FIX).",name);
- SendClientMessageToAll(0xA52A2AAA,zin);
- SendClientMessage(playerid,0xff0000ff,"Buvote išmestas iš serverio dėl nelegalių programų naudojimo.{ffffff} Jei tai įvyko per klaidą, prašome susisiekti su administracija.");
- print(zin);
- Kick(playerid);
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- if(IsPlayerNearPNS(playerid)) duzus[GetPlayerVehicleID(playerid)]=false;
- ACFix(playerid,GetPlayerVehicleID(playerid));
- }
- return 1;
- }
- /*
- NAUDOJIMAS :
- Automobilio sutaisymo komandoje naudot duzus[vehicleid] = false ir atstatyt automobilio gyvybes.
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement