Need help with stock
#1

stock LoadVehicles()
{
for(new i; i<100; i++)
{
new vfile[8]; format(vfile, sizeof(vfile), "Vehicles/%d.ini", i);
if(dini_Exists(vfile)){CreateVehicle(dini_Int(vfil e,"Model"),dini_Float(vfile,"X"),dini_Float(vfile, "Y"),dini_Float(vfile,"Z"),dini_Float(vfile,"A"),d ini_Int(vfile,"C1"),dini_Int(vfile,"C2"),600);}
}
return 1;
}

public OnFilterScriptInit()
{
LoadVehicles();
return 1;
}

//Where is the problem, my cars won't spawn, it works only when im using custom CMD to load vehicles. but callbacks wont work with my function...
Reply
#2

do you wrote under OnGameModeInit this LoadVehicles()
Reply
#3

i think it should work with OnFilterScriptinit() cuz its a FS. its the same thing. but it won't work....
Reply
#4

pawn Код:
new vfile[17];
format(vfile, sizeof(vfile), "Vehicles/%d.ini", i);
The string size was too small, it cut out some characters

Also, I suggest you to use something else than dini as it's very slow. Try Y_INI or any of the newly released INI systems - they're a lot faster!
Reply
#5

OMG the problem was with that stupid string lol thanx alot )
i think to put MYSQL in my script later.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)