Hukaeshi Posted May 14, 2018 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)
TEDERIs Posted May 19, 2018 Posted May 19, 2018 I think the hasObjectPermissionTo function can help you. This is my GitHub repository where you can find a lot of my work. And this is my YouTube channel with reviews of some resources. Good luck and enjoy MTA!
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