WelCome

Members
  • Content count

    11
  • Joined

  • Last visited

Community Reputation

0 Neutral

About WelCome

  • Rank
    Square
  1. [HELP] Table

    Ty work
  2. [HELP] Table

    Hi today i wanted to create anty-relog system but i got error what's wrong with this code? local coltable = {} addEventHandler("onPlayerWeaponFire",root,function() local x, y, z = getElementPosition(source) coltable[source] = createColSphere(x,y,z,100) for _,v in pairs(getElementsWithinColShape(coltable[source],"player")) do outputChatBox("TesT",v) end end) setTimer(function(plr) destroyElement(coltable[source]) end,3000,0) db3 : destroyElement(coltable[source])
  3. smoothMoveCamera

    Hello, how to stop smoothMoveCamera ?
  4. Tables

    Why this code didnt work? tablee = {} col_table = {} local function take(thePlayer) if isElementWithinColShape(thePlayer,col) then local ammo = getPickupAmmo(pickup) local bron = getPickupWeapon(pickup) giveWeapon(thePlayer,bron,ammo) outputChatBox("test") table.remove(col_table) table.remove(tablee) end end local function weapon_drop (thePlayer) local bron = getPlayerWeapon(thePlayer) local ammo = getPedTotalAmmo(thePlayer) local slot = getPedWeaponSlot(thePlayer) local x,y,z = getElementPosition(thePlayer) local pickup_bron = getPedWeapon(thePlayer) local p = getPedWeapon(thePlayer) if slot >= 0 then if ammo >= 0 then pickup = createPickup(x,y,z,2,p,0,ammo) col = createColSphere(x,y,z,1.0) table.insert(col_table,col) takeWeapon(thePlayer,p,ammo) table.insert(tablee,pickup) addEventHandler("onPickupHit",pickup,take) end end end addCommandHandler("bind_q",function(thePlayer) bindKey(thePlayer,"U","down",weapon_drop,thePlayer) bindKey(thePlayer,"I","down",take,thePlayer) end)
  5. Error

    I want drop weapon and pick weapon but if u drop two weapon first weapon will didnt cant pick
  6. Error

    Why this code didn't work tablee = {} col_table = {} local function take(thePlayer) if isElementWithinColShape(thePlayer,col) then local ammo = getPickupAmmo(pickup) local bron = getPickupWeapon(pickup) giveWeapon(thePlayer,bron,ammo) outputChatBox("test") table.remove(col_table) table.remove(tablee) end end local function weapon_drop (thePlayer) local bron = getPlayerWeapon(thePlayer) local ammo = getPedTotalAmmo(thePlayer) local slot = getPedWeaponSlot(thePlayer) local x,y,z = getElementPosition(thePlayer) local pickup_bron = getPedWeapon(thePlayer) local p = getPedWeapon(thePlayer) if slot >= 0 then if ammo >= 0 then pickup = createPickup(x,y,z,2,p,0,ammo) col = createColSphere(x,y,z,1.0) table.insert(col_table,col) takeWeapon(thePlayer,p,ammo) table.insert(tablee,pickup) addEventHandler("onPickupHit",pickup,take) end end end addCommandHandler("bind_q",function(thePlayer) bindKey(thePlayer,"U","down",weapon_drop,thePlayer) bindKey(thePlayer,"I","down",take,thePlayer) end)
  7. Error

    function take(thePlayer) if isElementWithinColShape(thePlayer,col) then local ammo = getPickupAmmo(pickup) local bron = getPickupWeapon(pickup) giveWeapon(thePlayer,bron,ammo) outputChatBox("test") destroyElement(col) destroyElement(pickup) end end function weapon_drop (thePlayer) local bron = getPlayerWeapon(thePlayer) local ammo = getPedTotalAmmo(thePlayer) local slot = getPedWeaponSlot(thePlayer) local x,y,z = getElementPosition(thePlayer) local pickup_bron = getPedWeapon(thePlayer) local p = getPedWeapon(thePlayer) if slot > 1 then if ammo > 1 then pickup = createPickup(x,y,z,2,p,0,ammo) col = createColSphere(x,y,z,1.0) addEventHandler("onPickupHit",pickup,take) takeWeapon(thePlayer,p,ammo) end end end addCommandHandler("bind_q",function(thePlayer) bindKey(thePlayer,"U","down",weapon_drop,thePlayer) bindKey(thePlayer,"I","down",take,thePlayer) end) I want to drop weapon,this code work but if is 2 pickup and if u hit 1 pickup, 2 will not work Pls help me
  8. Timer

    Ok ty work
  9. Timer

    You can't help me here ?
  10. Timer

    I changed it, but it does not work sry for bad english i use google translator
  11. Timer

    function timer(player) if getPlayerTeam(player)==team then print("Work") local losuj = math.random(1,3) if losuj==1 then givePlayerMoney(player,2000) elseif losuj==2 then setPedArmor(player,100) setElementHealth(player,100) elseif losuj==3 then giveWeapon(player,36,3) end end end setTimer(timer,2000,0,source) DebugScript 3 : Bad argument 'getPlayerTeam' [Expected player at argument 1,got nil]