Advertisement
KingOfVC

-..-

Feb 20th, 2015
386
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. else if ( cmd == "getcar" )
  2. {
  3. local q = QuerySQL( db2, "SELECT * FROM Cars WHERE rowid LIKE '" + text + "'" );
  4. local id = player.ID
  5. if ( !text ) car( "Syntax: /c " + cmd + " <ID>", player );
  6. else if ( !IsNum( text ) ) car( "Error: The vehicle ID should be in number.", player );
  7. else
  8. {
  9. local veh = FindVehicle( text.tointeger() );
  10. if ( veh.ID > GetVehicleCount() ) car( "Error: Invalid vehicle ID.", player );
  11. else if ( !IsOwnerOrSharer( veh, player ) ) car( "Error: You do not own this vehicle.", player );
  12. else
  13. {
  14. local plr = FindPlayer( GetPlayers() );
  15. local vid = plr.Vehicle
  16. if ( vid.ID == text.tointeger() ) ssmg("[ " + plr.Name + " ] has stolen your vehicle",player)
  17. else
  18. {
  19. car( "You have brought your vehicle [ " + GetVehicleNameFromModel( veh.Model ) + " ]", player );
  20. veh.Pos = Vector( player.Pos.x + 6, player.Pos.y, player.Pos.z - 1 );
  21. veh.Angle = player.Angle;
  22. }
  23. }
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement