Jump to content

[HELP] Level required spawn


Sande

Recommended Posts

Hey, i am trying to make this command only for if player is level 7. I am using castillos exp_system, help thanks :)

  
function spawnLambo(thePlayer, theLevel, commandName) 
     local account = getPlayerAccount ( thePlayer ) 
     local myLevel = exports.exp_system:getPlayerLevel ( thePlayer ) 
     if exports ["exp_system"]:getPlayerLevel ( thePlayer ) < 7 then --[[Problem place, need to check if level 7 then can spawn--]] 
     local x, y, z = getElementPosition ( thePlayer ) 
    local lamborgini =  createVehicle ( 477, x, y, z + 10 ) 
    warpPedIntoVehicle ( thePlayer, lamborgini ) 
    outputChatBox("[server] Spawnaus onnistui.", thePlayer, 0,255,0) 
    else 
    outputChatBox("[server] Et ole riittävän iso levelinen spawnataksesi tätä kohdetta.", thePlayer, 255,0,0) 
end 
end 
addCommandHandler("lauto", spawnLambo ) 
  

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...