Sande Posted October 31, 2013 Share Posted October 31, 2013 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
TAPL Posted October 31, 2013 Share Posted October 31, 2013 if exports ["exp_system"]:getPlayerLevel ( thePlayer ) >= 7 then Link to comment
Sande Posted October 31, 2013 Author Share Posted October 31, 2013 if exports ["exp_system"]:getPlayerLevel ( thePlayer ) >= 7 then Thank you very much Link to comment
tosfera Posted October 31, 2013 Share Posted October 31, 2013 To make TAPL's post complete; The relational operators in Lua are == ~= < > <= >= Qouted from http://www.lua.org/manual/5.1/manual.html#2.5.1 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now