Sign in to follow this  

Help function give weapons panel moderator

Recommended Posts

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 
                id = wepName 
                if player == source then 
                    amount = 9999 
					outputChatBox("#FF0000Moderador: #55FF00te has dado "..amount.." balas del arma "".", source, 255, 255, 255, true)				
                    amount = 90
outputChatBox("#FFFF00Alerta: #55FF00El Moderador #FF0000"..getPlayerName(source).." #55FF00Le ha dado "..amount.." balas del arma "" al jugador #FF0000"..getPlayerName(player)..".", root, 255, 225, 255, true)	
outputChatBox("#FF0000Moderador: #55FF00Le has dado a "..getPlayerName(player).." "..amount.." balas del arma "".", source, 255, 255, 255, true)				
                        giveWeapon(player, id,amount, true) 
addEvent("DarArma", true) 
addEventHandler("DarArma", getRootElement(), DarArmaF) 


Share this post

Link to post

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.