cars from filterscripts get messed up with cars from gm
#1

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
Reply
#2

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 ?
Reply
#3

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.
Reply
#4

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
Reply
#5

Try this:

In gamemode AddStaticVehicle
In Filterscript just use Createvehicle
Reply
#6

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 ...
Reply
#7

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

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 )
Reply
#9

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 ...
Reply
#10

if(newcar == owner1)?

You might want to try

if(vehicleid == owner1)

I believe that works...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)