SA-MP Forums Archive
Anti Vehicle Spawn? - 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: Anti Vehicle Spawn? (/showthread.php?tid=583046)



Anti Vehicle Spawn? - FreddiewJO - 25.07.2015

HI guys, I'm searching for an anti vehicle spawn.. Can you help me?


Re : Anti Vehicle Spawn? - anassmaroc - 25.07.2015

https://sampforum.blast.hk/showthread.php?pid=1832467#pid1832467


Re: Anti Vehicle Spawn? - trablon - 25.07.2015

Easy.


Just place a integer variable about 'originalvehicle' into your create vehicle function.When ever you create a vehicle, count it from 0 to MAX_VEHICLES with break.Then use this variable for kicking hackers;

PHP код:
public OnVehicleSpawn(vehicleid)
{
    return 
1;
}

public 
OnPlayerEnterVehicle(playeridvehicleidispassenger)
{
    return 
1;




Re: Re : Anti Vehicle Spawn? - FreddiewJO - 25.07.2015

Quote:
Originally Posted by anassmaroc
Посмотреть сообщение
I tried this but cheater can already spawn vehicles..


Re: Anti Vehicle Spawn? - FreddiewJO - 25.07.2015

Quote:
Originally Posted by trablon
Посмотреть сообщение
Easy.


Just place a integer variable about 'originalvehicle' into your create vehicle function.When ever you create a vehicle, count it from 0 to MAX_VEHICLES with break.Then use this variable for kicking hackers;

PHP код:
public OnVehicleSpawn(vehicleid)
{
    return 
1;
}
public 
OnPlayerEnterVehicle(playeridvehicleidispassenger)
{
    return 
1;

I don't want something like this, but an anti vehicle spawn cheat.. With this also admin can't spawn vehicles


Re: Anti Vehicle Spawn? - xVIP3Rx - 25.07.2015

Okay, checks if a vehicle has spawned, and an admin's who spawned it, if not then destroy it and kick the spawn-er(the closest one to it)