SA-MP Forums Archive
[Help] Vehicle ID change when loading - 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: [Help] Vehicle ID change when loading (/showthread.php?tid=70796)



[Help] Vehicle ID change when loading - Diablo1st - 27.03.2009

Hello, i have a problem when my Gamemode and filterscript loads; in my Gamemode there are some vehicles (for factions etc...) and my filterscript load a file with other vehicles added (Owned Vehicles).
I Need that the Server fristly load the Gamemode with ALL vehicles and set the IDs, then starts the loading of the FS. So in the Gamemode if i have set 200 vehicles the server will give Vehicles IDs 1 to 200 then when start the loading of the Filterscript other VehicleID

My problem is how i'm now set, the Server Mix ID. This mix of Vehicle IDs make my Gamemode not work in the right way: for example if i enter in an ambulance the server will say "You are not a Pizza Boy" and so on...

Thanks for have read


Re: [Help] Vehicle ID change when loading - worxds - 27.03.2009

Vehicle ID != Model ID.


Re: [Help] Vehicle ID change when loading - tom_jonez - 27.03.2009

i think this will work.
pawn Код:
forward LoadFs();

public LoadFs()
{
SendRconCommand("loadfs fs.amx");
return 1;
}

public OnGameModeInit()
{
SetTimer("LoadFs",3000,0);//put at the end just incase.
return 1;
}

public OnGameModeExit()
{
SendRconCommand("unloadfs fs.amx");
return 1;
}
now remove the filterscript from the server.cfg and then change the names of the fs in the code above. This will load it 3 seconds after the gamemode starts so the gm vehicles load first, then the fs.


Re: [Help] Vehicle ID change when loading - MenaceX^ - 27.03.2009

Quote:
Originally Posted by tom_jonez
i think this will work.
pawn Код:
forward LoadFs();

public LoadFs()
{
SendRconCommand("loadfs fs.amx");
return 1;
}

public OnGameModeInit()
{
SetTimer("LoadFs",3000,0);//put at the end just incase.
return 1;
}

public OnGameModeExit()
{
SendRconCommand("unloadfs fs.amx");
return 1;
}
now remove the filterscript from the server.cfg and then change the names of the fs in the code above. This will load it 3 seconds after the gamemode starts so the gm vehicles load first, then the fs.
Could be shorter.
pawn Код:
forward LoadFs();
public LoadFs() SendRconCommand("loadfs fs");
public OnGameModeInit() SetTimer("LoadFs",3000,0);
public OnGameModeExit() SendRconCommand("unloadfs fs");



Re: [Help] Vehicle ID change when loading - Diablo1st - 27.03.2009

thanks so much for have reply
i'm going to test it right now, and i will say if it's working thanks again

WORK


Re: [Help] Vehicle ID change when loading - tom_jonez - 27.03.2009

Quote:
Originally Posted by MenaceX^
Quote:
Originally Posted by tom_jonez
i think this will work.
pawn Код:
forward LoadFs();

public LoadFs()
{
SendRconCommand("loadfs fs.amx");
return 1;
}

public OnGameModeInit()
{
SetTimer("LoadFs",3000,0);//put at the end just incase.
return 1;
}

public OnGameModeExit()
{
SendRconCommand("unloadfs fs.amx");
return 1;
}
now remove the filterscript from the server.cfg and then change the names of the fs in the code above. This will load it 3 seconds after the gamemode starts so the gm vehicles load first, then the fs.
Could be shorter.
pawn Код:
forward LoadFs();
public LoadFs() SendRconCommand("loadfs fs");
public OnGameModeInit() SetTimer("LoadFs",3000,0);
public OnGameModeExit() SendRconCommand("unloadfs fs");
except the only thing that could be shorter is the public LoadFs bc everything else needs to be put inside the gm.... which doesnt have 1 script execution...