PDA

View Full Version : Vehicle .txt


CurlyPwn
26/05/2013, 08:51 AM
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

CurlyPwn
26/05/2013, 09:13 AM
Can someone help please

seanny
26/05/2013, 09:28 AM
Can you show us your OnGameModeInit code?

park4bmx
26/05/2013, 09:31 AM
The include function doesn't work like that!
It needs to be out of all callbacks, on top of the whole script!

Vince
26/05/2013, 10:31 AM
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.

CurlyPwn
26/05/2013, 10:59 AM
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

Dragonsaurus
26/05/2013, 11:34 AM
Put "#include <vehicles/car.txt>" under "#include <a_samp>"
PS: Sorry if I am late...