SA-MP Forums Archive
cars from filterscripts get messed up with cars from gm - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: cars from filterscripts get messed up with cars from gm (/showthread.php?tid=250051)



cars from filterscripts get messed up with cars from gm - rekatluos - 21.04.2011

i made a filterscript to make ownable cars (i add them manualy and make them check by players name) . it worked fine for a while but now some cars show me that they belong to a faction ....and ofc the owner cant join anymore .

to make myself clear ,the names from filterscripts are different from the names in the gamemode (i mean when i make a car like new car1; and then car1 = addstaticvehicle etc )


there must be something i can do so they dont get messed up,help pls


Re: cars from filterscripts get messed up with cars from gm - rekatluos - 21.04.2011

bump ,help pls ? i bet lots of people get this problem


the only fix i know is to add them into the gamemode but that will be troublesome since i wanna reload them to add new owners

also one more thing ,when i start the server,though the cars filterscript seems to load ,i must unload and load it again for the cars to spawn ,any idea why that happens ?


Re: cars from filterscripts get messed up with cars from gm - alpha500delta - 21.04.2011

Maybe you're checking the vehicle MODEL instead of the defined name, that might be messing it up with factions. And about the loading, I have no idea, you might have passed the car-limit in SA:MP.


Re: cars from filterscripts get messed up with cars from gm - rekatluos - 21.04.2011

can't be checking the model,the ownership wouldnt work if that would be the problem

and the car limit,what was that,2000 ? i forgot lol


Re: cars from filterscripts get messed up with cars from gm - captainjohn - 21.04.2011

Try this:

In gamemode AddStaticVehicle
In Filterscript just use Createvehicle


Re: cars from filterscripts get messed up with cars from gm - rekatluos - 21.04.2011

nope....exactly the same ,il try removing some vehicles later to see if there are too many,but i dont think i reached the limit ...


Re: cars from filterscripts get messed up with cars from gm - captainjohn - 21.04.2011

Well the allowed limit of vehicles is 2000.
Can you copy a section of the part of the script your having problems with please?


Re: cars from filterscripts get messed up with cars from gm - rekatluos - 21.04.2011

theres no part of the script with problems .... they work just fine if filterscript or gamemode is alone...when 2geder the gamemode messes up the cars so it makes them look like they're part of a faction

here ill show you some part of the script

first

pawn Код:
new owner1;
then
pawn Код:
owner1 = CreateVehicle(560,-296.6297,1539.6565,75.2699,136.2736,1,1,14400);
tried with createvehicle,addstaticvehicle and addstaticvehicleex ,no luck (not that it would have to do anything anyway)

and then the end

pawn Код:
if(newcar == owner1)
    {
        new PlayerName[MAX_PLAYER_NAME];
        new playerState = GetPlayerState(playerid);
        GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
        if(strcmp(PlayerName, "here is the player name", true) == 0)
        {
            SendClientMessage(playerid, COLOR_1BLUE,"* your car.");
        }
also i have onfilterscriptexit to destroyvehicle(owner1);


so the filterscript has no problem,it worked just fine until today when i added 2 more cars ,which i dont understand why it messed up (and again i say ,theres nothing wrong with the script ,no errors,everything works fine if a factionless gamemode.... there just may be something that needs to be changed so they dont get messed up )


Re: cars from filterscripts get messed up with cars from gm - rekatluos - 22.04.2011

bump ? come on no one knows how to fix this? i added them to the gamemode and it works perfectly ,but that makes it hard for me to update ...


Re: cars from filterscripts get messed up with cars from gm - alpha500delta - 22.04.2011

if(newcar == owner1)?

You might want to try

if(vehicleid == owner1)

I believe that works...