Jump to content

Xwad

Members
  • Posts

    1,090
  • Joined

  • Last visited

Everything posted by Xwad

  1. Xwad

    Player demage

    its working but there are sopme bugs. I changed the 51 id to 30 (ak47) and shooted the id 165 skin player with the gun. It was working but if i shoted the legs or the head then the player was healed not demaged pls help:/ Maybe need i define bodyparts? its only damaging on the torso.
  2. Xwad

    Player blips

    hi i have a script that makes possible when i shoot with a gun then the players will see my blip on the map but its not working:/ function applyBlips() for k, player in pairs( getElementsByType( "player" ) ) do local r, g, b = getPlayerNametagColor( player ) if isPedDead( player ) then return end if not blip[player] then blip[player] = createBlipAttachedTo( player, 0, 2, r, g, b, 255, 0, blipViewDistance ) else setBlipColor( blip[player], r, g, b, 255 ) end end end addEventHandler( "onWeaponFire", resourceRoot, applyBlips ) setTimer( applyBlips, 500, 0 ) -- This is to account for name tag colour changes, especially in RPG servers. function createBlips() if ( source ) then player = source end local r, g, b = getPlayerNametagColor( player ) if not blip[player] then blip[player] = createBlipAttachedTo( player, 0, 2, r, g, b, 255, 0, blipViewDistance ) else setBlipColor( blip[player], r, g, b, 255 ) end end addEventHandler( "onWeaponFire", root, createBlips )
  3. Xwad

    Player demage

    is it now good? local newHealth = getElementHealth(source) + loss - 5 function setHP(attacker, weapon, loss) if getElementType(attacker) == "player" if (weapon == 51 and getElementModel(source) == 165) then if newHealth > 0 then setElementHealth(source,newHealth ) else setElementHealth(source,0) end end end addEventHandler("onClientPlayerDamage", localPlayer, setHP )
  4. Xwad

    Player demage

    KariiiM i testet it but it still not works. IIYAMA you mean add to that script? addEventHandler("onClientPlayerDamage", root, function (attacker, weapon, loss) if ( isElement ( attacker ) and weapon and attacker== localPlayer and getElementModel(source) == 165) then if (weapon == 51 and getElementModel(source) == 165) then cancelEvent() setElementHealth(source,getElementHealth(source) - 5) end end end)
  5. Xwad

    Player demage

    its not working:/ But i dont want to cancel the event i just want to set that the explosion will make 5 hp demage on skin id 165
  6. Xwad

    Player demage

    Hi i hahave made a script that changes the explosion demage on the skin 165 but its not working:/ pls help. function noob(attacker, weapon, loss, x, y, z, tyre) if (weapon == 51 and getElementModel(source) == 165) then setElementHealth(source,getElementHealth(source) - 5) cancelEvent() end end addEventHandler("onClientPlayerDamage", root, noob)
  7. i made it but its not working.. I want to mute the tank shooting sound and add a new shooting sound --tank shooting sounds local sound function shootingSound() if (getElementModel(source) == 601) then setWorldSoundEnabled ( 5, true ) sound = playSound("sounds/sound3.mp3") setSoundVolume(sound, 1) else cancelEvent() end end function bindTheKeys () bindKey ( "mouse1", "down", shootingSound ) end
  8. yeah its working with the example but for hand weapons and i want to mute the rhinos shooting sound.. I thing the number 5 is for the hand weapons. Is there a list for that numbers?
  9. To disable the original tank shooting sounds need i use SetWorldSoundEnabled function? Thanks.
  10. ? Sorry i dont understand you.. I only uderstand your last setence. I cant use monstertruck for tank becaouse its ni a towered vehicle
  11. Hi. Is it possible to add new vehicles (not replace) to mta with this or any other way? http://gtasa.gamebanana.com/tuts/11199 Just becaouse im making a world of tank server and i need more rhino tanks to add more skins..
  12. For setting the planes speed need i use setAircragtMaxVelocity?
  13. Xwad

    Vehicle blow

    ohh ok:( thanks
  14. Xwad

    Vehicle blow

    ohh ok thanks.And one more question. How can i make that if i shoot with the rhino something (fir example an object) then the bullet will not blow? (i want to disable the rhinos bullet explosion if its hit something)
  15. Xwad

    Vehicle blow

    Hi i want to make a script that makes possible that the vehicle will only blow if it has 0 % hp. Becaouse the vehicles blows if the hp is under 250%. What functions need i use for that?
  16. Xwad

    Destroyelement

    MY god i made the same script but when i made it then i didnt work now it works thanks!!
  17. Xwad

    Destroyelement

    The problem is now that the script gives me the 513 vehicle immediately:/ I want to set the timer to the creatvehicle too not only for the destroyelemnt:/
  18. Xwad

    Destroyelement

    why need i delete the event?
  19. Xwad

    Destroyelement

    i fixed the Destroyelemnt problem but now i have anbother problem.. After the vehicle is destroyed it must create and warp me i a vehicle but its not working:/ function vehicleExplode () if (getElementModel(source) == 476) then setTimer( destroyElement, 4000, 1, source) local x,y,z = getElementPosition(source) local vehicle = createVehicle(513,-2117.46, -2340.69, 100 + 3) warpPedIntoVehicle(source,vehicle) end end addEventHandler ( "onVehicleEnter", getRootElement(), vehicleExplode )
  20. Xwad

    Destroyelement

    sry i dont understand that. What do you mean with create it by yourself? Maybe need i use destroyElement?
  21. Xwad

    Destroyelement

    Hi i made a script but its not working:/ The script is that if i enter the rustler(476) then the script will destroy the element(the rustler) in 5 sec and create a vehicle and warp me in that vehicle. debugscript: ERROR: shop/server.lua:54: attempt to call global 'destroyVehiclesOfModel' (a nil value) server.lua function timerKill (modelID) local USAteam = getTeamFromName("USA") if(getPlayerTeam ( localPlayer ) == USAteam) then local vehicles = getElementsByType("vehicle") for i,v in ipairs(vehicles) do if (getElementModel(v) == modelID) then destroyElement(v) local x,y,z = getElementPosition(source) local vehicle = createVehicle(601,-2117.46, -2340.69, 100 + 3) warpPedIntoVehicle(source,vehicle) end end end end destroyVehiclesOfModel(476) setTimer ( timerKill, 5000, 1 )
×
×
  • Create New...