AntiVehicle Teleport - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: AntiVehicle Teleport (
/showthread.php?tid=575651)
AntiVehicle Teleport -
ilepopivanov - 28.05.2015
PHP код:
public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z)
{
if(GetVehicleDistanceFromPoint(vehicleid, new_x, new_y, new_z) > 35)
{
new Float:StarX, Float:StarY, Float:StarZ;
GetVehiclePos(vehicleid, StarX, StarY, StarZ);
SetVehiclePos(vehicleid, StarX, StarY, StarZ);
return 0;
}
return 1;
}
What is wrong O.o ?
Re: AntiVehicle Teleport -
Vince - 28.05.2015
That if-statement can never be true. You need to compare distance to the old position, not the new one.
See example on
this page for efficient GetDistanceBetweenPoints.
Re: AntiVehicle Teleport -
ilepopivanov - 28.05.2015
http://prntscr.com/7ajr90 lol
Re: AntiVehicle Teleport -
ilepopivanov - 29.05.2015
BUmp
Re: AntiVehicle Teleport -
ilepopivanov - 30.05.2015
fgfdjgnifjfdigjudfuio BUMPPP
Respuesta: AntiVehicle Teleport -
AndreLuiz - 31.05.2015
http://*******/dwoSW3
or
https://sampforum.blast.hk/showthread.php?pid=1832467#pid1832467