Posts: 86
Threads: 25
Joined: May 2013
26.05.2013, 08:51
(
Последний раз редактировалось CurlyPwn; 26.05.2013 в 09:06.
Причина: Not understandable
)
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
Posts: 86
Threads: 25
Joined: May 2013
Posts: 1,429
Threads: 321
Joined: Oct 2010
Reputation:
0
Can you show us your OnGameModeInit code?
Posts: 2,364
Threads: 135
Joined: Dec 2009
Reputation:
0
The include function doesn't work like that!
It needs to be out of all callbacks, on top of the whole script!
Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
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.
Posts: 86
Threads: 25
Joined: May 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
Posts: 499
Threads: 4
Joined: Apr 2013
Reputation:
0
Put "#include <vehicles/car.txt>" under "#include <a_samp>"
PS: Sorry if I am late...