Hukaeshi Posted May 14, 2018 Share Posted May 14, 2018 Good day guys, I was creating a panel of moderator, but... i need help with my function of giving weapons, what I want to do is block so that you can not give Minigun or Sniper to a player can only give the moderator itself. function DarArmaF(client, getText) player = getPlayerFromName(client) if not isElement(player) then return end local wepID,wepName = getWeaponIDFromName(getText),getWeaponNameFromID(getText) if wepID then id = wepID else id = wepName end if player == source then amount = 9999 outputChatBox("#FF0000Moderador: #55FF00te has dado "..amount.." balas del arma "..id..".", source, 255, 255, 255, true) else amount = 90 outputChatBox("#FFFF00Alerta: #55FF00El Moderador #FF0000"..getPlayerName(source).." #55FF00Le ha dado "..amount.." balas del arma " ..id.." al jugador #FF0000"..getPlayerName(player)..".", root, 255, 225, 255, true) outputChatBox("#FF0000Moderador: #55FF00Le has dado a "..getPlayerName(player).." "..amount.." balas del arma "..id..".", source, 255, 255, 255, true) end giveWeapon(player, id,amount, true) end addEvent("DarArma", true) addEventHandler("DarArma", getRootElement(), DarArmaF) Link to comment
Hukaeshi Posted May 18, 2018 Author Share Posted May 18, 2018 Please help me what this problem Link to comment
TEDERIs Posted May 19, 2018 Share Posted May 19, 2018 I think the hasObjectPermissionTo function can help you. 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