Did you replace this:
bindKey("m", "down", function () guiSetVisible ( GUIEditor_Window[1], not guiGetVisible(GUIEditor_Window[1])) showCursor(not isCursorShowing()) end)
for this
function showTheGUI (key,keySate)
if isObjectInACLGroup (source,aclGetGroup("Admin")) then
if guiGetVisible (GUIEditor_Window[1]) == false then
guiSetVisible ( GUIEditor_Window[1],true)
showCursor (true)
else
guiSetVisible ( GUIEditor_Window[1],false)
showCursor (false)
end
else outputChatBox ("You Are not admin")
end
end
bindKey ("m","down",showTheGUI)
Try this
function showTheGUI (key,keySate)
if isObjectInACLGroup (source,aclGetGroup("Admin")) then
if guiGetVisible (GUIEditor_Window[1]) == false then
guiSetVisible ( GUIEditor_Window[1],true)
showCursor (true)
else
guiSetVisible ( GUIEditor_Window[1],false)
showCursor (false)
end
else outputChatBox ("You Are not admin")
end
end
bindKey ("m","down",showTheGUI)
Im not sure if it works
I used makePed instead of an eventHandler
makePed (120,0,0,5,31,200)
function makePed (skin,x,y,z,id,amount )
if not tonumber ( id ) then return end
if not tonumber ( amount ) then amount = 500 end
ped = createPed (skin,x,y,z)
giveWeapon(ped, id, amount, true )
end
Hi i want to ask how its possible to give weapons to a ped? i know the comand must be giveWeapon but it doesn´t work,
this is the default MTA Wiki example i tryed to adapt it to an eventHandler but i cant. Can someoneExplain me how?
ped = createPed( 19, -1634.5775, 1203.85, 7.1796 )
addCommandHandler( "give",
function ( player, command, id, amount )
if not tonumber ( id ) then return end
if not tonumber ( amount ) then
amount = 9001
end
giveWeapon( ped, id, amount, true )
end
)