Jump to content

Raziru

Members
  • Posts

    4
  • Joined

  • Last visited

Details

  • Location
    Mars

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Raziru's Achievements

Vic

Vic (3/54)

0

Reputation

  1. addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateWindow(455, 191, 425, 227, "", false) guiWindowSetSizable(wnd, false) butt1 = guiCreateButton(14, 30, 133, 32, "deagle", false, wnd) butt2 = guiCreateButton(199, 38, 150, 34, "shotgun", false, wnd) butt3 = guiCreateButton(300, 10, 150, 34, "2", false, wnd) ebox = guiCreateEdit(139, 111, 182, 45, "", false, wnd) addEventHandler( "onClientGUIClick", butt1, function() if (source==butt1) then slot1= tostring(guiGetText (ebox)) bindKey(slot1,"down",function() cslot1= getPedWeaponSlot ( localPlayer ) if ((2-cslot1) > 0) then for i =1,(2-cslot1) do setControlState ( "next_weapon", true ) outputChatBox("next_fail") end elseif((2-cslot1)<0) then for i =1,(cslot1-2) do setControlState ( "previous_weapon", true ) outputChatBox("pre_fail") end end end) end end) end) that's when i tried "next_weapon" control. addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateWindow(455, 191, 425, 227, "", false) guiWindowSetSizable(wnd, false) butt1 = guiCreateButton(14, 30, 133, 32, "deagle", false, wnd) butt2 = guiCreateButton(199, 38, 150, 34, "shotgun", false, wnd) butt3 = guiCreateButton(300, 10, 150, 34, "2", false, wnd) ebox = guiCreateEdit(139, 111, 182, 45, "", false, wnd) addEventHandler( "onClientGUIClick", butt1, function() if (source==butt1) then slot1= tostring(guiGetText (ebox)) bindKey(slot1,"down",function() setPedWeaponSlot (localPlayer,2) end) end end) addEventHandler( "onClientGUIClick", butt2, function() if (source==butt2) then slot2= tostring(guiGetText (ebox)) bindKey(slot2,"down",function() setPedWeaponSlot (localPlayer,3) end) end end) end) that one when i tried to bind one key for 2 functions only the 2nd entered function will work.
  2. I've tried to set them having instantly switch to sniper but the trick is if you were to bind 4>Fist, 4>Sniper It wont instantly switch to both. It will switch to 1 of them. so i'm trying to toggle "next_weapon" control till i reach the weapon i desire.
  3. for i =1,(4) do setControlState ( "next_weapon", true ) outputChatBox("next_fail") end outputChatBox triggers 3 times while setControlState triggers only once. I'd like to have next_weapon 3 times, but it only works once. How can I do it?
  4. -- outputChatBox triggers 3 times while setControlState triggers only once. for i =1,(4) do setControlState ( "next_weapon", true ) outputChatBox("next_fail") end
×
×
  • Create New...