• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

[SOLVED] Help allowing commands only for GM

Status
Not open for further replies.

freza

Emulation Addict
How do I allow these two scripts are allowed only to GMs rank 1+ ? plz

Code:
print("Iniciado tele pvp ")

local function OnCommand(event, player, command, lang)
      if (player and command == "arena") then
       if (player:IsInCombat() == true) then
        player:SendBroadcastMessage("|cffffff00[ |cffff0000! |cffffff00] |r |cffffffffVoce esta em combate |cffffff00[ |cffff0000! |cffffff00] |r")
   else
        player:Teleport( 1, -3729.389893, 1095.479980, 152.544006, 3.086590 )
 end
    end
end

RegisterPlayerEvent(42, OnCommand)

Code:
local function OnCommand(event, player, msg, Type, lang)
  if (msg == "buff") then
    if (player:IsInCombat() == neutre) then
        player:SendAreaTriggerMessage("Voce esta em combate")
  else
        player:AddAura(48162, player) 
        player:AddAura(48074, player) 
        player:AddAura(48170, player)       	
        player:SendNotification("|cffffffff Parabens, agora esta mais forte!!! Divirta-se")
        return false
            end
      end
end

RegisterPlayerEvent(42, OnCommand)
 
Status
Not open for further replies.
Top