SHARE
TWEET

Untitled

a guest Nov 8th, 2019 143 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function giveVehicleKey(player,cmd,kplayer)
  2.     local target=getPlayerFromName(kplayer)
  3.     local veh=getPedOccupiedVehicle(player)
  4.     if(getPedOccupiedVehicleSeat(player)==0)then
  5.         if(veh)then
  6.             if(MtxGetElementData(veh,"Slot"))then
  7.                 if(MtxGetElementData(veh,"UID")==getPlayerName(player))then
  8.                     if(target and target~=player)then
  9.                         dbExec(handler,"UPDATE ?? SET ??=? WHERE ??=? AND ??=?","vehicles","KeyTarget",getPlayerName(target),"UID",getPlayerName(player),"Slot",MtxGetElementData(veh,"Slot"))
  10.                         MtxSetElementData(veh,"KeyTarget",getPlayerName(target))
  11.                         triggerClientEvent ( player, "infobox_start", getRootElement(),"Fahrzeugschlüssel von Slot "..MtxGetElementData(veh,"Slot").." an "..getPlayerName(target).." gegeben.")
  12.                     end
  13.                 else
  14.                     triggerClientEvent ( player, "infobox_start", getRootElement(), "Das Fahrzeug gehört dir nicht!", 5000, 125, 0, 0 )
  15.                 end
  16.             else
  17.             triggerClientEvent ( player, "infobox_start", getRootElement(), "Das Fahrzeug gehört dir nicht", 5000, 125, 0, 0 )
  18.             end
  19.         end
  20.     else
  21.         triggerClientEvent ( player, "infobox_start", getRootElement(), "Du sitzt in keinem Fahrzeug!", 5000, 125, 0, 0 )
  22.     end
  23. end
  24. addCommandHandler("givekey",giveVehicleKey)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top