Jump to content

iPanda

Members
  • Posts

    174
  • Joined

  • Last visited

Everything posted by iPanda

  1. iPanda

    [Help] Fatigue

    Running sprint should last ten seconds, and then to run again sprint to otdohnu six seconds.
  2. iPanda

    [Help] Fatigue

    Here is the endurance. But her work is not quite stable - help fix stamina = 10 addEventHandler ( "onClientPlayerSpawn", getLocalPlayer(), function () stamina = 10 setTimer(checkKey,10000,0) setTimer(updateStamina,5000,0) end ) function checkKey() if ( getControlState ( "sprint" ) ) and stamina ~= 0 then stamina = stamina -1 end if ( stamina == 0 ) then setControlState( "sprint", false ) end end function updateStamina() if stamina ~= 10 and getControlState ( "sprint" ) == false then stamina = stamina +1 end end
  3. Hello everyone! I have a question: how to make an animation that will be done only once. So, I clicked on the H key, my player play the animation only once, and I can continue playing. I have a similar script, but there is no main function, which gives the animation only once. Please help. function maskAnimation ( thePed ) setPedAnimation ( thePed, "goggles", "goggles_put_on", 1000, false, false, false ) end
  4. iPanda

    [Help] Fatigue

    I just recently teaching language Lua and I do not know how to do this function with toggleControl, can give a ready-made script, if not difficult?
  5. This is a normal flashlight, but I need a flashlight on his head
  6. Hello everyone! I found a very interesting video, which shows the flashlight on his head. I would like to take this resource, if possible. Watch the video:
  7. Guys, on some servers, I saw that they had a script endurance - ie fatigue while running a sprint. How it works: The player ran a sprint distance can not run a sprint, and the only light jogging. To start running again, the player must sprint to rest, such as squat and wait. If you can get me this resource - I will be forever grateful to you! Oh, I'm sorry for my English, I am a citizen of Russia and do not know much English ...
  8. But there must be ways to change clothes, I'm sure!
  9. Your example still does not replace the model and texture! ...
  10. First: the texture and model hockey mask = "hockey" , "hockeymask" Second: Your example still does not replace the model and texture! ...
  11. I want to make the radiation zone on its server MTA. These areas must be the same as the games Fallout 3 or STALKER. The above are 3 points detail the functions of radiation.
  12. I have a question for you - how to replace DFF model the clothes on the server? I found a topic Vicky, who helps to solve this problem https://wiki.multitheftauto.com/wiki/Clothing_Component_IDs But! When I replace my clothes on - Multiplayer MTA closes by itself. Crash. I need your help. Help change the model, because I'm certainly doing something wrong. I look forward to your response! txd = engineLoadTXD( "hockey.txd" ) engineImportTXD( txd, "hockey" ) dff = engineLoadDFF( "hockeymask.dff", "hockeymask" ) engineReplaceModel( dff, "hockeymask" ) Crash! ps. Help to replace model a hockey mask to gas mask! - -
  13. Tell me, how do I make the zone of radiation on the RPG server!? Option means that under the radiation on the server: 1. This specific locations on the map. 2. If you get to the radiation - will drop health 3. When injected into the radiation appears sound of a Geiger counter. Radiation zone - this is what you can see in the game Fallout 3 or STALKER. I need to know how to make these areas and what features are needed for this? I hope you can help me ... I look forward to your response!
  14. A model of how to replace a hockey mask on a gas mask? Using ID clothing https://wiki.multitheftauto.com/wiki/Clothing_Component_IDs When to use: gasmaskTXD = engineLoadTXD("gasmask.txd") engineImportTXD(gasmaskTXD, 30376) gasmaskDFF = engineLoadDFF("gasmask.dff", 30376) engineReplaceModel(gasmaskDFF, 30376) That's right, is not it? If it is correct, then I do not understand why I have an error. MTA itself is closed when I wear a hockey mask replaced by a gas mask. Can you help me fix the game crashes?
  15. Please give the one script that you used to get a hockey mask!
  16. Still does not work ... Non, hockey mask = ID 15 https://wiki.multitheftauto.com/wiki/CJ_Clothes%5CHats_(16)
  17. Oops, that's the thing. I do not go in with the Login Panel. May apply onPlayerJoin and onPlayerQuit ??
  18. Unfortunately nothing works.
  19. I didn't had time to fix. Never used pedClothes before. local gasMaskActivation = function (player) local texture,model = getPedClothes ( player, 15 ) if not (texture == "hockey" and model == "hockeymask") then addPedClothes ( player, "hockey", "hockeymask", 15 ) else removePedClothes ( player, 15 ) end end addEventHandler ("onPlayerLogin",root, function() bindKey (source,"h","up",gasMaskActivation) end) addEventHandler ("onPlayerLogout",root, function() if isKeyBound ( source,"h","up",gasMaskActivation ) then unbindKey (source,"h","up",gasMaskActivation) end end) I just tested this script on my RPG server. Unfortunately the script does not work: (And I do not know how to fix it. As the script was supposed to work: Any player on the server can at any time put on and remove mask by pressing the "H". (Gas mask - clothes, replaced hockey mask) And yet can take addPlayerClothes and removePlayerClothes? - If you just change the Player to Ped, then nothing at all will not work.
  20. please can give your life once again, I did not have time to copy it.
  21. What to use removePlayerClothes or removePedClothes, because I want any players could wear / remove a gas mask at all times! That is, it must be: -- GIVE GAS MASK FOR PLAYER local offmask = 0 addEventHandler ( "onPlayerLogin", getRootElement (), function gasmask ( player ) if offmask == 1 then addPlayerClothes ( source, "hockey", "hockeymask", 15 ) elseif offmask == 0 then removePlayerClothes ( source, 15 ) end end ) bindKey ( "h", "down", gasmask ) bindKey ( "h", "up", gasmask ) Or the second option: -- GIVE GAS MASK FOR PLAYER local offmask = 0 function gasmask() bindKey (source,"h","up", function ( player ) if offmask == 1 then addPlayerClothes ( player, "hockey", "hockeymask", 15 ) elseif offmask == 0 then removePlayerClothes ( source, 15 ) end end ) end addEventHandler ("onPlayerLogin",getRootElement(),gasmask) But somehow, I am sure that this option is not correct. Please, if you can tell me how to make a script correctly. - -
  22. I just recently started learning Lua. This is my first serious script and I need your help. /*\Skin only works on skin = 0 What gives resourse: When you press the "h" to start the animation and you will find yourself in a gas mask. How it should work: 1. I replaced the hockey mask (clothing) on a gas mask. 2. Did the script with addPlayerClothes and removePlayerClothes 3. When you press the "h" the player must be in a gas mask. He may at any time take it off and put on again. Unfortunately the script does not work, help me find the problem and fix it. p.s. Sorry for my english, I'm from Russia. -- ANIMATION local drees = false function animGasMask(player, key, keyState) if drees then setPedAnimation(player, false) drees = false else if isPedInVehicle(player) then return end setPedAnimation(player, "goggles", "goggles_put_on", nil, true, false, false, false) drees = true end end -- GIVE GAS MASK FOR PLAYER function dressGasMask ( dress, gasmask ) if getLocalPlayer ( getPedSkin ( dress ) == 0 ) then addPlayerClothes ( getLocalPlayer (source, "hockey", "hockeymask", 15 ) ) end end addEventHandler ( "onPlayerLogin", getRootElement(), dressGasMask ) function shootGasMask ( shoot, gasmask ) if getLocalPlayer ( getPedSkin ( shoot ) == 0 ) then removePlayerClothes ( source, 15 ) end end addEventHandler ( "onPlayerLogin", getRootElement(), shootGasMask ) -- BIND KEYS function bindTheKeys() bindKey ( source, "h", "down", animGasMask ) bindKey ( source, "h", "down", shootGasMask ) bindKey ( source, "h", "up", dressGasMask ) end addEventHandler("onPlayerLogin", getRootElement(), bindTheKeys) I look forward to your answers to help me solve this problem ...
  23. 2. Что вы понимаете под словом "движок"? 3. Разве в CEGUI окнах так трудно разобатся? Есть даже WYSIWYG конструктор. Сейчас CEGUI окна может создать практически любой. 5. Что вы понимаете под словом "скрипт"? Скрипт может быть огромный, а может занимать всего 1-3 строчки... я не знаю как это еще назвать - "движок", я подробно описал что я хочу. Если скрипты маленькие/огромные, то и оплата соответственная. Можете дать ссылку на WYSIWYG редактор для GUI ?
  24. еще может помочь это: setFarClipDistance
×
×
  • Create New...