Jump to content

Fist

Members
  • Posts

    433
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Fist

  1. ehh ok, this will do ok for 1sec delay you can't notice anyway that it does actually load ammo. Thanks!
  2. i tried both sides, almost same problem. I can't set ammo it says i'm giving invalid source or weapon.
  3. i updated comment, check it out.
  4. yeah ik that be actually easier, but it doesn't look that good 'cause it will show in hud that it reloaded but you still can't shoot. By the way, you know how i can add fake bullet into gun when he runs out of ammo ? That fake bullet wouldn't be possible to shoot but just for that you still could hold empty gun in your hands. @NeXuS™ @Gordon_G i tried like this but it gives me warning that it expected element at first argument of setWeaponAmmo. Weird... addEventHandler("onPlayerWeaponFire", root, function(weapon) if (weapon == 33) then if isTimer(delay_timer) then killTimer(delay_timer) end local o_ammo = getPedTotalAmmo(source,33); local delay_timer = setTimer(function(source) setWeaponAmmo(source,33,o_ammo,0); end,500,0); setTimer(function(source) if isTimer(delay_timer) then killTimer(delay_timer) end end,1000,1); end end);
  5. Ok, gonna try that ty for idea.
  6. is it possible to make rifle reload slower? Otherwise it instantly reloads next bullet in so fast. I want to have it like 1-2 second delay between each bullet.
  7. i said etc, im pretty sure by changing that number 3 will change size im not sure tho. You have to do something by yourself aswell mate, otherwise you'll not learn anything.
  8. you have to modify data below that code, there are positons etc, just make new check variable for your new backpack and modify position of it. if (newValue == 26) then attachElementToBone(elementBackpack[source], source, 3, 0, -0.16, 0.05, 270, 0, 180); elseif (newValue == YOURBACKPACKSIZE) then -- Theese are the positions that you need to change. Just play around with them attachElementToBone(elementBackpack[source], source, 3, 0, -0.16, 0.05, 270, 0, 180); else attachElementToBone(elementBackpack[source], source, 3, 0, -0.225, 0.05, 90, 0, 0); end
  9. try this elseif (newValue == 16) then elementBackpack[source] = createObject(1248, x, y, z); -- Alice Pack elseif (newValue == 26) then elementBackpack[source] = createObject(1575, x, y, z); -- Czech Backpack elseif (newValue == 36) then elementBackpack[source] = createObject(1252, x, y, z); -- Coyote Backpack elseif (newValue >= 44) then elementBackpack[source] = createObject(371, x, y, z); -- Hunting Backpack @Actimel
  10. go to file core.lua file find 559 line and you'll see this code of script elseif (newValue >= 36) then elementBackpack[source] = createObject(1252, x, y, z); -- Coyote Backpack copy it and put 1 line below and change newValue >= 36 to whatever your backpack maximum slot is and change createObject id to that new backpack what you want to show.
  11. addEventHandler("onClientPlayerWeaponSwitch",root,function(pSlot,nSlot) if (getPedWeapon(localPlayer,nSlot) == 31) then showPlayerHudComponent ("crosshair",true) else showPlayerHudComponent ("crosshair",false) end end);
  12. Thank you! That's what i needed.
  13. I actually already got it managed to encode/decode but how i could use that encoded image without decoding it into back to image but just using that decoded data ?
  14. hey! Is it possible to encode image or model file so people couldn't steal it and when i would need to use it on server i could just decode it through code?
  15. nvm, it was working fine. It just created file in client's pc. All works now!
  16. hello! i tried many times creating xml file and loading it on client side but it doesn't work only for server side. local xml = xmlLoadFile("test.xml"); if not xml then xml = xmlCreateFile("test.xml","test"); xmlNodeSetAttribute(xml,"1",1); xmlNodeSetAttribute(xml,"2",2); xmlSaveFile(xml); end
  17. i think problem is here if (string.find(message, cancelableworld[i])) then pretty sure it has to be like this instead if (string.find(message, v)) then
  18. Fist

    Custom mute

    not tested but should work. to mute use /pmute player minutes reason addCommandHandler("pmute",function(source,cmd,player,minutes,reason) local target = getPlayerFromName(player); if (target) then if not isPlayerMuted(target) then setPlayerMuted(target,true) outputChatBox("player "..player.." has been muted by "..getPlayerName(source).." (duration: "..minutes.." minutes) (reason: "..reason..")",root,255,0,0); setTimer(function() setPlayerMuted(target,false) outputChatBox("player's "..player.." mute has expired",root,255,0,0); end,tonumber(minutes)*60000,1) else outputChatBox("player is already muted",source,255,0,0); end end end);
  19. well, i already figured it out. But thanks anyway for your time, also do you know by any chance how to get longest string from table?
  20. @coNolel i actually did it by my self, it actually was way simplier than i thought. Thanks to your sample i managed to make it. Thanks man alot! thanks for trying to help tho. I appreciate people like that.
  21. i mean't his, but yours won't work for me 'cause those image parts are seprate images not 1 big image.
  22. i mean it draws it but it's just a 1 image, i can't tell or it works or not. Can you just edit that dxDrawBorderedRectangle by just adding corner images and those lines itself to images aswell?
  23. imageWidth and imageHeight doesn't exist?
×
×
  • Create New...