Vehicle help.

Started by FarisDon, Jul 12, 2015, 04:30 AM

Previous topic - Next topic

FarisDon

  local veh = FindVehicle( text.tointeger() );
if ( veh.ID > GetVehicleCount() ) ClientMessage( "Invalid Vehicle ID.", player,255,255,0); <- error
Wrong Numbers Of Parameters
Well i just got outlawz vehicle system and i modified it a bit , but i didn't change anything like this well i want to say that in other 0.3 scripts its working fien but now its not any help
p.s:sorry i can't post any screen shot as i am from laptop , and i don't know how to.

Thijn

That check is worthless. If the vehicle Id does not exist the veh variable will be null.
So change that if to if (veh) first.

FarisDon

Quote from: Thijn on Jul 12, 2015, 11:16 AMThat check is worthless. If the vehicle Id does not exist the veh variable will be null.
So change that if to if (veh) first.
if ( veh )ClientMessage( "Invalid Vehicle .", player,255,255,0); now it shows me everytime that vehicle is invaild and the other thing when i type /getcar 994 it shows me the same error.