Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- else if ( cmd == "getcar" )
- {
- local q = QuerySQL( db2, "SELECT * FROM Cars WHERE rowid LIKE '" + text + "'" );
- local id = player.ID
- if ( !text ) car( "Syntax: /c " + cmd + " <ID>", player );
- else if ( !IsNum( text ) ) car( "Error: The vehicle ID should be in number.", player );
- else
- {
- local veh = FindVehicle( text.tointeger() );
- if ( veh.ID > GetVehicleCount() ) car( "Error: Invalid vehicle ID.", player );
- else if ( !IsOwnerOrSharer( veh, player ) ) car( "Error: You do not own this vehicle.", player );
- else
- {
- local plr = FindPlayer( GetPlayers() );
- local vid = plr.Vehicle
- if ( vid.ID == text.tointeger() ) ssmg("[ " + plr.Name + " ] has stolen your vehicle",player)
- else
- {
- car( "You have brought your vehicle [ " + GetVehicleNameFromModel( veh.Model ) + " ]", player );
- veh.Pos = Vector( player.Pos.x + 6, player.Pos.y, player.Pos.z - 1 );
- veh.Angle = player.Angle;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement