08.11.2014, 00:24
I make system which block vehicle teleport,from cheat.
But i have problem,when I was near the vehicle script say to me probably use vehicle spawn
How to make script don't responds when is player near the vehicle
only is vehicle distance of point over some meters..
I use this public:
Sory for my bad english :P
But i have problem,when I was near the vehicle script say to me probably use vehicle spawn
How to make script don't responds when is player near the vehicle
only is vehicle distance of point over some meters..
I use this public:
Код:
public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat) { if (!passenger_seat && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT && GetVehicleDistanceFromPoint(vehicleid, VehiclePos[vehicleid][0], VehiclePos[vehicleid][1], VehiclePos[vehicleid][2]) > 50.0) { new Float: x, Float: y, Float: z; GetXYZInFrontOfPlayer(playerid, x, y, z, 5.0); if (GetVehicleDistanceFromPoint (vehicleid, x, y, z) < 7.0) //This is the problem { OnPlayerVehiclePort(playerid); // This is the public which checking and kick player if spawn vehicle return 0; } } GetVehiclePos(vehicleid, VehiclePos[vehicleid][0], VehiclePos[vehicleid][1], VehiclePos[vehicleid][2]); return 1; }