Vehicle .txt - 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)
+--- Thread: Vehicle .txt (
/showthread.php?tid=439624)
Vehicle .txt -
CurlyPwn - 26.05.2013
i wanted to add vehicles using text files
i wrote these
#include vehicles/bone.txt
under ongamemodeint but i get a error saying cant read the file can someone help
Re: Vehicle .txt -
CurlyPwn - 26.05.2013
Can someone help please
Re: Vehicle .txt -
seanny - 26.05.2013
Can you show us your OnGameModeInit code?
Re: Vehicle .txt -
park4bmx - 26.05.2013
The
include function doesn't work like that!
It needs to be out of all callbacks, on top of the whole script!
Re: Vehicle .txt -
Vince - 26.05.2013
It doesn't even work like that because those files just contain coordinates and not actual statements. You need a function to load them. I think the Grand Larceny mode contains a function to load them. Although sscanf might be a better option all the way.
Re: Vehicle .txt -
CurlyPwn - 26.05.2013
Quote:
public OnGameModeInit()
{
#include vehicles/car.txt
SetGameModeText("iFreeRoam");
AddPlayerClass(0, 1683.0627, -2244.2290, 13.5427, 179.8361, 0, 0, 0, 0, 0, 0);
UsePlayerPedAnims();
return 1;
}
|
thats my gamemodeint i dont understand it should work
Re: Vehicle .txt -
Dragonsaurus - 26.05.2013
Put "#include <vehicles/car.txt>" under "#include <a_samp>"
PS: Sorry if I am late...