Anti vehicle create.
#1

How to make something like Anti vehicle create ? That only vehicles with AddStaticVehicle/CreateVehicle work, hackers spawned vehicles will be destroyed.
Reply
#2

Labas(Hello) Reikia kazka sumastyti, kad tikrintu masinas serveri(ju skaiciu)... Bet cia siaip sunkus dalykas manau... Sorry I'm talking about this anti vehicle create Who can create it? I need this anti vehicle create too
Reply
#3

Dude.. its easy ... if your server dont needs any vehicel shit... then you can put Destroy vehicle under OnVehicleSpawn
Reply
#4

Ok i made it
pawn Код:
forward CheckVehicles();
public CheckVehicles()
{
    for(new DestVeh = LastCar+1; DestVeh < 701; DestVeh++)
    {
        DestroyVehicle(DestVeh);
    }
    return 1;
}
LastCar is last cars id. Maybe someone need this too On OnVehicleSpawn doesnt work this...
Reply
#5

Yes... OnSpawnVehicle will clean all the vehicles...but the code you made will not allow any new vehicle

Nice 1
Reply
#6

Because my mode dont create any new vehicles, for now this will be ok :P
Reply
#7

Good job dreft I will use this
Reply
#8

Vehicles can't be created client-side. Only ones set script-side.
Reply
#9

Quote:

hackers spawned vehicles will be destroyed.
Quote:
Originally Posted by ǝɹoɯ‾ʎ
Vehicles can't be created client-side. Only ones set script-side.
Hacks/Mods can allow any vehicles to be spawned client side only.

I 'think' the server won't be able to destroy the client side vehicles anyway, because you need to pass the vehicleid to DestroyVehicle.

Suggestion: (cba coding)
IsPlayerInAnyVehicle, if the player is in a vehicle and if the vehicle is not valid (0-700), kick/ban/punish the player.
Reply
#10

I got an idea..
1) Make a Timer which will check that which player is in which vehicle.
2) If the player is in the vehicle (the maximum number of vehicles) your server have, then its OK.
3) If Player is in vehicle, but the vehicle ID is not under your server's vehicle limit, then kick the player..lol
4) Sorry, If you think this a cheap idea.

Thank You
-Abhinav
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)