vehicles

Started by :P, Sep 19, 2015, 01:18 PM

Previous topic - Next topic

:P

not coming vehicles in game while vehicles created in database why   using kusnagi system for vehicles
SLC is a good scripter but he always use bad words for abusing players :P

MacTavish

Have you added LoadCars? And does it show any error?

Try in onScriptLoad

print("vehs: "+GetVehicleCount()); and see what it returns

Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P

:P

vehs = 0   and i add on scriptload  loadcar like that (" LoadCars () ; ") otherwise its show error loadcars does not exists
SLC is a good scripter but he always use bad words for abusing players :P

MacTavish

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 );

}

Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P

:P

what you do in that its start working
SLC is a good scripter but he always use bad words for abusing players :P

KAKAN

He;s the beginner version of FinchDon, killerx why don't you try to debug the thing yourself?
Anyways post your onscriptload event here
oh no

KAKAN

And are u calling the onscriptload or any event twice? If yes, then its kinda wrong
oh no

FinchDon

@KAKAN I know i was noob but not like him :(
For any help and support Join #s-s at IRC for Help in Scripting
( For Newbies )

KAKAN

Was? Really? :D, i know u r better than him
oh no

:P

@KAKAN   my prob solve by kusnagi but i ask what mistake i did >:(
SLC is a good scripter but he always use bad words for abusing players :P