Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: FarisDon on Jul 12, 2015, 04:30 AM

Title: Vehicle help.
Post by: FarisDon on Jul 12, 2015, 04:30 AM
  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.
Title: Re: Vehicle help.
Post by: Thijn on Jul 12, 2015, 11:16 AM
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.
Title: Re: Vehicle help.
Post by: FarisDon on Jul 12, 2015, 11:37 AM
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.