not coming vehicles in game while vehicles created in database why using kusnagi system for vehicles
Have you added LoadCars? And does it show any error?
Try in onScriptLoad
print("vehs: "+GetVehicleCount());
and see what it returns
vehs = 0 and i add on scriptload loadcar like that (" LoadCars () ; ") otherwise its show error loadcars does not exists
onScriptLoad()
{
LoadCars();
}
Add it any where in script better copy paste it at the end of your main.nut
function LoadCars()
{
local q = QuerySQL( vdb, "SELECT * FROM Vehicles" ), i = 0;
while( GetSQLColumnData( q, 0 ) )
{
local
Model = GetSQLColumnData( q, 0 ),
World = GetSQLColumnData( q, 1 ),
PX= GetSQLColumnData( q, 2 ),
PY = GetSQLColumnData( q, 3 ),
PZ = GetSQLColumnData( q, 4 ),
Angle = GetSQLColumnData( q, 5 ),
col1 = GetSQLColumnData( q, 6 ),
col2 = GetSQLColumnData( q, 7 );
CreateVehicle( Model.tointeger(), World.tointeger(), Vector( PX.tofloat(), PY.tofloat(), PZ.tofloat() ), Angle.tofloat(), col1, col2 );
GetSQLNextRow( q );
i++;
}
print( "Cars loaded - " + i );
}
what you do in that its start working
He;s the beginner version of FinchDon, killerx why don't you try to debug the thing yourself?
Anyways post your onscriptload event here
And are u calling the onscriptload or any event twice? If yes, then its kinda wrong
@KAKAN I know i was noob but not like him :(
Was? Really? :D, i know u r better than him
@KAKAN my prob solve by kusnagi but i ask what mistake i did >:(