Jump to content

Xwad

Members
  • Posts

    1,089
  • Joined

  • Last visited

Everything posted by Xwad

  1. ohh fixed, i just used getRootElement ()
  2. Hey i have one more question: I want to disable that players can demage other player who are in a vehicle. I made the script but its not working: function stopMinigunDamage ( attacker, weapon, bodypart ) outputChatBox("test", 255, 255, 255) if isPedInVehicle (localPlayer) then cancelEvent() end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), stopMinigunDamage )
  3. Thanks a lot! I found the name! If anyone needs it: beach_sfs
  4. why is my code not working?? tank = {[496]=true} skins = { [100]=true,[101]=true,[102]=true,[103]=true } function disableEnemyTankUsage ( player, seat, jacked ) if ( tank[getElementModel(source)] ) and ( not skins[getElementModel(player)] ) then cancelEvent() outputChatBox ( "Enemy vehicle!", player ) end end addEventHandler ( "onVehicleStartEnter", getRootElement(), disableEnemyTankUsage )
  5. now everythink is working expect one bug that makes me very angry!! when i start the script then every model is removing sucessfull. But when a player reconnect then he will see all the Occlusions of the models!!! Pls guys help me fix that!!
  6. Hi. I need the texture of this model: 10352 (Iwant to use it for mapping) i opened gta3.img with txd workshop to export the texture but there's to much files, i cant find the texture of the model:/ Does everyone know whats the texture name of model 10352 ? Thanks.
  7. Hi. I downloaded TXD Workshop 1 years ago, and it worked perfectly. But now when i try to import a png picture then my Windows Crashes!! I always get blue death XDD VIDEO: https://2.sendvid.com/y2yju27c.mp4
  8. Xwad

    [MAP] Normandy 1944

    my World War II test server: mtasa://37.59.197.166:27215 Please report all bugs!
  9. I think thats the wrong section. Use the Customblips resource from the community.
  10. does not work:/ still al ports are closed:( Maybe the problem is that im using an internet cable and not wifi?? Help!
  11. I already disabled all firewalls. I have win 7. Is this video good for set the static ip?:
  12. I opened all ports for mta but when i type "openports" into the mta server.exe then it says that all ports all closed. image of the opened ports: http://i.imgur.com/eCzE8g2.png
  13. Xwad

    [MAP] Normandy 1944

    Thanks CodyL! I will PM you if i need help:) Unfortunatelly i am in the hospital right now, so i cant work on the map. But as soon as i recover i will continue the work.
  14. Xwad

    [MAP] Normandy 1944

    Thanks, i will try it!
  15. but i put all in one table
  16. now its fully not wroking. all the skins are on a different weapon ids. I dont use it only on one weapon function onWasted() if isElement(attach[source]) then destroyElement(attach[source]) attach[source] = nil outputChatBox("destroyed",source) end end addEventHandler("onPlayerWasted",root,onWasted) local attach = {} function custom_mp40(prev,cur) local id = getElementModel(source) if id == 21 then if cur == 29 then if isElement(attach[source]) then destroyElement(attach[source]) attach[source] = nil end attach[source] = createObject(1855,0,0,0) exports.bone_attach:attachElementToBone(attach[source],source,12,0,0,0,-3,-90,0) outputChatBox("created",source, 255, 255, 0) else if isElement(attach[source]) then destroyElement(attach[source]) attach[source] = nil outputChatBox("destroyed",source, 0,255,0) end end end end addEventHandler ("onPlayerWeaponSwitch", getRootElement(),custom_mp40) function custom_thompson(prev,cur) local id = getElementModel(source) if id == 101 then if cur == 29 then if isElement(attach[source]) then destroyElement(attach[source]) attach[source] = nil end attach[source] = createObject(1856,0,0,0) exports.bone_attach:attachElementToBone(attach[source],source,12,0,0,0,-1.5,-90,0) outputChatBox("created",source, 255, 255, 0) else if isElement(attach[source]) then destroyElement(attach[source]) attach[source] = nil outputChatBox("destroyed",source, 0,255,0) end end end end addEventHandler ("onPlayerWeaponSwitch", getRootElement(),custom_thompson) function custom_mp44(prev,cur) local id = getElementModel(source) if id == 20 then if cur == 30 then if isElement(attach[source]) then destroyElement(attach[source]) attach[source] = nil end attach[source] = createObject(1857,0,0,0) exports.bone_attach:attachElementToBone(attach[source],source,12,0,0,0,-2,-97,0) outputChatBox("created",source, 255, 255, 0) else if isElement(attach[source]) then destroyElement(attach[source]) attach[source] = nil outputChatBox("destroyed",source, 0,255,0) end end end end addEventHandler ("onPlayerWeaponSwitch", getRootElement(),custom_mp44) function custom_bar(prev,cur) local id = getElementModel(source) if id == 100 then if cur == 30 then if isElement(attach[source]) then destroyElement(attach[source]) attach[source] = nil end attach[source] = createObject(1858,0,0,0) exports.bone_attach:attachElementToBone(attach[source],source,12,0,0,0,-2,-98,0) outputChatBox("created",source, 255, 255, 0) else if isElement(attach[source]) then destroyElement(attach[source]) attach[source] = nil outputChatBox("destroyed",source, 0,255,0) end end end end addEventHandler ("onPlayerWeaponSwitch", getRootElement(),custom_bar) function custom_g43(prev,cur) local id = getElementModel(source) if id == 22 then if cur == 33 then if isElement(attach[source]) then destroyElement(attach[source]) attach[source] = nil end attach[source] = createObject(1859,0,0,0) exports.bone_attach:attachElementToBone(attach[source],source,12,0,0,0,-3,-92,0) outputChatBox("created",source, 255, 255, 0) else if isElement(attach[source]) then destroyElement(attach[source]) attach[source] = nil outputChatBox("destroyed",source, 0,255,0) end end end end addEventHandler ("onPlayerWeaponSwitch", getRootElement(),custom_g43) function custom_garand(prev,cur) local id = getElementModel(source) if id == 102 then if cur == 33 then if isElement(attach[source]) then destroyElement(attach[source]) attach[source] = nil end attach[source] = createObject(1860,0,0,0) exports.bone_attach:attachElementToBone(attach[source],source,12,0,0,0,-1.2,-92,0) outputChatBox("created",source, 255, 255, 0) else if isElement(attach[source]) then destroyElement(attach[source]) attach[source] = nil outputChatBox("destroyed",source, 0,255,0) end end end end addEventHandler ("onPlayerWeaponSwitch", getRootElement(),custom_garand) function custom_luger(prev,cur) local id = getElementModel(source) if id == 20 or id == 21 or id == 22 then if cur == 23 then if isElement(attach[source]) then destroyElement(attach[source]) attach[source] = nil end attach[source] = createObject(1861,0,0,0) exports.bone_attach:attachElementToBone(attach[source],source,12,0,0,0,0,-90,0) outputChatBox("created",source, 255, 255, 0) else if isElement(attach[source]) then destroyElement(attach[source]) attach[source] = nil outputChatBox("destroyed",source, 0,255,0) end end end end addEventHandler ("onPlayerWeaponSwitch", getRootElement(),custom_luger) function custom_colt45(prev,cur) local id = getElementModel(source) if id == 100 or id == 101 or id == 102 then if cur == 23 then if isElement(attach[source]) then destroyElement(attach[source]) attach[source] = nil end attach[source] = createObject(1862,0,0,0) exports.bone_attach:attachElementToBone(attach[source],source,12,0,0,0,0,-90,0) outputChatBox("created",source, 255, 255, 0) else if isElement(attach[source]) then destroyElement(attach[source]) attach[source] = nil outputChatBox("destroyed",source, 0,255,0) end end end end addEventHandler ("onPlayerWeaponSwitch", getRootElement(),custom_colt45) function custom_panzershrek(prev,cur) local id = getElementModel(source) if id == 20 then if cur == 29 then if isElement(attach[source]) then destroyElement(attach[source]) attach[source] = nil end attach[source] = createObject(1863,0,0,0) exports.bone_attach:attachElementToBone(attach[source],source,12,0,0,0,0,-90,0) outputChatBox("created",source, 255, 255, 0) else if isElement(attach[source]) then destroyElement(attach[source]) attach[source] = nil outputChatBox("destroyed",source, 0,255,0) end end end end addEventHandler ("onPlayerWeaponSwitch", getRootElement(),custom_panzershrek) function custom_bazooka(prev,cur) local id = getElementModel(source) if id == 100 then if cur == 29 then if isElement(attach[source]) then destroyElement(attach[source]) attach[source] = nil end attach[source] = createObject(1864,0,0,0) exports.bone_attach:attachElementToBone(attach[source],source,12,0,0,0,0,-90,0) outputChatBox("created",source, 255, 255, 0) else if isElement(attach[source]) then destroyElement(attach[source]) attach[source] = nil outputChatBox("destroyed",source, 0,255,0) end end end end
  17. i dont undesratnd this... I added more custom weapons and it gives the same debugscript!! pls help is the problem becaouse of the table name? It must be "table"? function onWasted() if isElement(attach_mp40[source]) then destroyElement(attach_mp40[source]) attach_mp40[source] = nil end if isElement(attach_thompson[source]) then destroyElement(attach_thompson[source]) attach_thompson[source] = nil end if isElement(attach_mp44[source]) then destroyElement(attach_mp44[source]) attach_mp44[source] = nil end if isElement(attach_bar[source]) then destroyElement(attach_bar[source]) attach_bar[source] = nil end if isElement(attach_g43[source]) then destroyElement(attach_g43[source]) attach_g43[source] = nil end if isElement(attach_garand[source]) then destroyElement(attach_garand[source]) attach_garand[source] = nil end if isElement(attach_luger[source]) then destroyElement(attach_luger[source]) attach_luger[source] = nil end if isElement(attach_colt45[source]) then destroyElement(attach_colt45[source]) attach_colt45[source] = nil end if isElement(attach_panzershrek[source]) then destroyElement(attach_panzershrek[source]) attach_panzershrek[source] = nil end if isElement(attach_bazooka[source]) then destroyElement(attach_bazooka[source]) attach_bazooka[source] = nil end if isElement(attach_kar98[source]) then destroyElement(attach_kar98[source]) attach_kar98[source] = nil end if isElement(attach_springfield[source]) then destroyElement(attach_springfield[source]) attach_springfield[source] = nil end end addEventHandler("onPlayerWasted",root,onWasted) local attach_mp40 = {} function custom_mp40(prev,cur) local id = getElementModel(source) if id == 21 then if cur == 29 then if isElement(attach_mp40[source]) then destroyElement(attach_mp40[source]) attach_mp40[source] = nil end attach_mp40[source] = createObject(1855,0,0,0) exports.bone_attach:attachElementToBone(attach_mp40[source],source,12,0,0,0,-3,-90,0) outputChatBox("created",source, 255, 255, 0) else if isElement(attach_mp40[source]) then destroyElement(attach_mp40[source]) attach_mp40[source] = nil outputChatBox("destroyed",source, 0,255,0) end end end end addEventHandler ("onPlayerWeaponSwitch", getRootElement(),custom_mp40) local attach_thompson = {} function custom_thompson(prev,cur) local id = getElementModel(source) if id == 101 then if cur == 29 then if isElement(attach_thompson[source]) then destroyElement(attach_thompson[source]) attach_thompson[source] = nil end attach_thompson[source] = createObject(1856,0,0,0) exports.bone_attach:attachElementToBone(attach_thompson[source],source,12,0,0,0,-1.5,-90,0) outputChatBox("created",source, 255, 255, 0) else if isElement(attach_thompson[source]) then destroyElement(attach_thompson[source]) attach_thompson[source] = nil outputChatBox("destroyed",source, 0,255,0) end end end end addEventHandler ("onPlayerWeaponSwitch", getRootElement(),custom_thompson) local attach_mp44 = {} function custom_mp44(prev,cur) local id = getElementModel(source) if id == 20 then if cur == 30 then if isElement(attach_mp44[source]) then destroyElement(attach_mp44[source]) attach_mp44[source] = nil end attach_mp44[source] = createObject(1857,0,0,0) exports.bone_attach:attachElementToBone(attach_mp44[source],source,12,0,0,0,-2,-97,0) outputChatBox("created",source, 255, 255, 0) else if isElement(attach_mp44[source]) then destroyElement(attach_mp44[source]) attach_mp44[source] = nil outputChatBox("destroyed",source, 0,255,0) end end end end addEventHandler ("onPlayerWeaponSwitch", getRootElement(),custom_mp44) local attach_bar = {} function custom_bar(prev,cur) local id = getElementModel(source) if id == 100 then if cur == 30 then if isElement(attach_bar[source]) then destroyElement(attach_bar[source]) attach_bar[source] = nil end attach_bar[source] = createObject(1858,0,0,0) exports.bone_attach:attachElementToBone(attach_bar[source],source,12,0,0,0,-2,-98,0) outputChatBox("created",source, 255, 255, 0) else if isElement(attach_bar[source]) then destroyElement(attach_bar[source]) attach_bar[source] = nil outputChatBox("destroyed",source, 0,255,0) end end end end addEventHandler ("onPlayerWeaponSwitch", getRootElement(),custom_bar) local attach_g43 = {} function custom_g43(prev,cur) local id = getElementModel(source) if id == 22 then if cur == 33 then if isElement(attach_g43[source]) then destroyElement(attach_g43[source]) attach_g43[source] = nil end attach_g43[source] = createObject(1859,0,0,0) exports.bone_attach:attachElementToBone(attach_g43[source],source,12,0,0,0,-3,-92,0) outputChatBox("created",source, 255, 255, 0) else if isElement(attach_g43[source]) then destroyElement(attach_g43[source]) attach_g43[source] = nil outputChatBox("destroyed",source, 0,255,0) end end end end addEventHandler ("onPlayerWeaponSwitch", getRootElement(),custom_g43) local attach_garand = {} function custom_garand(prev,cur) local id = getElementModel(source) if id == 102 then if cur == 33 then if isElement(attach_garand[source]) then destroyElement(attach_garand[source]) attach_garand[source] = nil end attach_garand[source] = createObject(1860,0,0,0) exports.bone_attach:attachElementToBone(attach_garand[source],source,12,0,0,0,-1.2,-92,0) outputChatBox("created",source, 255, 255, 0) else if isElement(attach_garand[source]) then destroyElement(attach_garand[source]) attach_garand[source] = nil outputChatBox("destroyed",source, 0,255,0) end end end end addEventHandler ("onPlayerWeaponSwitch", getRootElement(),custom_garand) local attach_luger = {} function custom_luger(prev,cur) local id = getElementModel(source) if id == 20 or id == 21 or id == 22 then if cur == 23 then if isElement(attach_luger[source]) then destroyElement(attach_luger[source]) attach_luger[source] = nil end attach_luger[source] = createObject(1861,0,0,0) exports.bone_attach:attachElementToBone(attach_luger[source],source,12,0,0,0,0,-90,0) outputChatBox("created",source, 255, 255, 0) else if isElement(attach_luger[source]) then destroyElement(attach_luger[source]) attach_luger[source] = nil outputChatBox("destroyed",source, 0,255,0) end end end end addEventHandler ("onPlayerWeaponSwitch", getRootElement(),custom_luger) local attach_colt45 = {} function custom_colt45(prev,cur) local id = getElementModel(source) if id == 100 or id == 101 or id == 102 then if cur == 23 then if isElement(attach_colt45[source]) then destroyElement(attach_colt45[source]) attach_colt45[source] = nil end attach_colt45[source] = createObject(1862,0,0,0) exports.bone_attach:attachElementToBone(attach_colt45[source],source,12,0,0,0,0,-90,0)
  18. yeah its working now, thanks again!
  19. ERROR: attempt to index global 'attach' (a nil value)
  20. now i have a new problem:/ i want to destroy the object when the player dies. my code is not working, please help function onWasted() destroyElement(attach[source]) outputChatBox("wasted", 255, 0, 0) end addEventHandler ( "onPlayerWasted", getRootElement(), onWasted ) local attach = {} function custom_mp40(prev,cur) local id = getElementModel(source) if id == 21 then if cur == 29 then if isElement(attach[source]) then destroyElement(attach[source]) attach[source] = nil end attach[source] = createObject(1855,0,0,0) exports.bone_attach:attachElementToBone(attach[source],source,12,0,0,0,-3,-90,0) outputChatBox("created",source, 255, 255, 0) else if isElement(attach[source]) then destroyElement(attach[source]) attach[source] = nil outputChatBox("destroyed",source, 0,255,0) end end end end addEventHandler ("onPlayerWeaponSwitch", getRootElement(),custom_mp40)
  21. Its working now Walid! ! Thanks guys!
  22. in my script i create an object, and i attach the object to the player with bone attach. my Problem is that other players cant see the object.. only the local player can see it:/ Does the root not contains the sync?? client function custom_mp40() local id = getElementModel ( source ) if id == 21 then local PedWeapon = getPedWeapon(localPlayer) if (PedWeapon == 29) then mp40 = createObject(1855,0,0,0) exports.bone_attach:attachElementToBone(mp40,localPlayer,12,0,0,0,-3,-90,0) outputChatBox("create", 255, 255, 0) end end if id == 21 then local PedWeapon = getPedWeapon(localPlayer) if not (PedWeapon == 29) then destroyElement(mp40) outputChatBox("destroyed", 255, 0, 0) end end end addEventHandler ( "onClientPlayerWeaponSwitch", getRootElement(), custom_mp40 )
  23. ERROR: Attempt to perform arithmetic on local 'rotZ' (a nil value)
×
×
  • Create New...