[FilterScript] [FS] Anti Spawner
#1

[removed]
Reply
#2

Yes this can be useful for stopping admins to spawn Disallowed Vehicles.

Thanks.

Kind Regards Sinces.
Reply
#3

very nice man!
Reply
#4

Its more a snippet than a script...

WeeDarr
Reply
#5

Sorry about this bump but i get error when trying to compile.
ERROR: error 029: invalid expression, assumed zero
On line 8 (error line): if (model==425||model==520||model==469||model==432|) {DestroyVehicle(vehicleid); return 1;}
Reply
#6

This would only work with CreateVehicle since only those vehicles can be later destroyed with DestroyVehicle. And start using switch instead of if in such cases because it's easier to be written and it is faster.
And yes, this isn't filterscript, but simple snippet.

pawn Код:
#include <a_samp>
#define FILTERSCRIPT
public OnFilterScriptInit() { return 1; }
public OnFilterScriptExit() { return 1; }
public OnVehicleSpawn(vehicleid)
{
    new model = GetVehicleModel(vehicleid);
    switch(model)
    {
        case 521,520,406,432,444,539,556,557: DestroyVehicle(vehicleid);
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)