SA-MP Forums Archive
Player can spawn bugged vehicles - 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: Player can spawn bugged vehicles (/showthread.php?tid=638098)



Player can spawn bugged vehicles - Amit1998 - 26.07.2017

Hey,
Sometimes a hacker logs into the server and just spawns vehicles that can not be removed.
If you explode them or throw them into the water they just get spawned back. Only a server restart fixes it.
I tried running a loop through my vehicles array and see if it's registered as active but it doesnt work.

Tips?


Re: Player can spawn bugged vehicles - Kane - 26.07.2017

What do you mean spawns? Like, creating vehicles themselves? I'm pretty sure it isn't possible to sync vehicles with the server using cheats.


Re: Player can spawn bugged vehicles - Amit1998 - 26.07.2017

Quote:
Originally Posted by Arthur Kane
Посмотреть сообщение
What do you mean spawns? Like, creating vehicles themselves? I'm pretty sure it isn't possible to sync vehicles with the server using cheats.
They somehow do that.


Re: Player can spawn bugged vehicles - Xtra - 26.07.2017

is there a solution ?


Re: Player can spawn bugged vehicles - Toroi - 26.07.2017

I'd use something like

Код:
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(vehicleid > X) // X being the max vehicleid registered on your server or some shit like that
         DestroyVehicle(vehicleid);
 
    return 1;
}



Re: Player can spawn bugged vehicles - Amit1998 - 27.07.2017

If it helps identify the problem; once I leave the vehicle it disappears and spawns back(it actually drops from the sky) in the same place it was at the begining.


Re: Player can spawn bugged vehicles - Abagail - 27.07.2017

It's not possible for them to spawn client side vehicles. When you enter these vehicles, what does GetPlayerVehicleID return?