Jump to content

xeon17

Members
  • Posts

    1,903
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by xeon17

  1. This is already solved but still thanks!
  2. Hello there , I have a problem with createEffect function since the effect is created i don't know how to destroy him. I tried with destroyElement but it didn't worked. Here is my code, any idea how to destroy/stop the effect? addEvent("onPlayerPayNSpray",true) addEventHandler("onPlayerPayNSpray",root, function () local x, y, z = getElementPosition(source) effect = createEffect("carwashspray", x, y, z) setTimer ( destroyElement(effect), 3000, 1) end) error setTimer exprected function at argument 1 , got boolean
  3. It uses GTA's tuning shop blip. If you want a custom one you'll have to do it yourself man sorry more, in small details that, agent notices a service nice. already you made based on GTA V, whim in the details my vote -10 Cry
  4. Thanks a lot it's works now!
  5. I don't know how , still waiting for help.
  6. Which part that he is selling these scripts you not understood?
  7. Hello there, Already three days i have a problem with one resource , the resource always have a error in /debugscript 3 and i don't know how to solve it , because for my eyes everything looks correct. Also, the resource works on client side but on server side it gives a error. Code: FishingBLIP = createBlip(-2238.76514, 2377.73901, 5.03511,9) distance = setBlipVisibleDistance(FishingBLIP,500) --local marker = createMarker(-2238.76514,2377.73901,5.03511,"cylinder",2,0,0,0,255) local pickup = createPickup(-2238.76514,2377.73901,5.03511,3,1239) function pickupUse () cancelEvent() end addEventHandler ( "onPickupUse", pickup, pickupUse ) -- Global data fisher_timer = nil fish_market_time = math.random(10000,30000) -- Fish data fish_last_pos = {{ }} fish_data = { -- name, money [1]={ "an Aligatorfish", 16 }, [2]={ "a Asian carp", 7 }, [3]={ "a Bandfish", 11 }, [4]={ "a Blue shark", 23 }, [5]={ "a Salmon", 45 }, [6]={ "a Norwegian Salmon", 67 }, [7]={ "a Pike", 23 }, [8]={ "a Perch", 24 }, [9]={ "a Black fish", 8 }, [10]={ "a Goldfish", 21 }, [11]={ "a Cat fish", 12 }, [12]={ "a Cow shark", 23 }, [13]={ "a Crestfish", 26 }, [14]={ "a Plaize", 14 }, [15]={ "a Coolie loach", 32 }, [16]={ "a Swedish Surströmming", 25 }, [17]={ "a Cobbler", 34 }, [18]={ "a Coffinfish", 17 }, [19]={ "a Dwarf gourami", 30 }, [20]={ "a Elver", 7 }, [21]={ "a Elephantnose fish", 23 }, [22]={ "a bag of weed", 156 }, [23]={ "a Eucla cod", 19 }, [24]={ "a Electric Eel", 23 }, [25]={ "a Emperior", 14 }, [26]={ "a Escolar", 14 }, [27]={ "a Elephant fish", 57 }, [28]={ "an anchor", 3 }, [29]={ "a Fire Goby", 29 }, [30]={ "a Four-eyed fish", 43 }, [31]={ "a Football fish", 31 }, [32]={ "a Frog fish", 4 }, [33]={ "a Frog", 75 }, [34]={ "a fish that has already been eaten", 1 }, [35]={ "a Frilled shark", 24 }, [36]={ "a French angel fish", 28 }, [37]={ "a Ground shark", 39 }, [38]={ "a Guppy", 4 }, [39]={ "a Gunnel", 21 }, [40]={ "a Goose fish", 33 }, [41]={ "a Golden throuth", 33 }, [42]={ "a bag of money", 42 }, [43]={ "a Ice fish", 21 }, [44]={ "a Horse fish", 22 }, [45]={ "a Hoki", 65 }, [46]={ "a Harelip sucker", 30 }, [47]={ "a Hairtail", 20 }, [48]={ "a Inconnu", 13 }, [49]={ "a Jewelfish", 91 }, [50]={ "a Knife fish", 34 }, [51]={ "a Ide", 17 }, [52]={ "a Killfish", 55 }, [53]={ "a Koi", 15 }, [54]={ "a Kokanee", 37 }, [55]={ "a piece of the lost city Atlantis", 99 }, [56]={ "a Japanese eel", 32 }, [57]={ "a IKEA chair", 42 }, [58]={ "a Lake chub", 27 }, [59]={ "a Luderick", 33 }, [60]={ "a Louvar", 21 }, [61]={ "a Longfin", 22 }, [62]={ "a Labyrinth fish", 11 }, [63]={ "a clam", 13 }, [64]={ "a broken clam", 2 }, [65]={ "a Long-finned pike", 28 }, [66]={ "something you didn't liked and threw back", 0 }, [67]={ "Lyretail", 33 }, [68]={ "a crab", 16 }, [69]={ "a Murray cod", 6 }, [70]={ "a Mud minnow", 8 }, [71]={ "a Mrigal", 3 }, [72]={ "a rock with the text \"Billy was here\"", 14 }, [73]={ "a Mud cat fish", 7 }, [74]={ "a Mullet", 5 }, [75]={ "the book \"nicke curious and the shark\"", 7 }, [76]={ "a shark", 1 }, [77]={ "a Milk fish", 9 }, [78]={ "the bottle of vodka you lost the last time you where here", 0 }, [79]={ "Mahseer", 12 }, [80]={ "a Monkfish", 25 }, [81]={ "a human hand", 3 }, [82]={ "a Nurse shark", 32 }, [83]={ "an eel", 3 }, [84]={ "a piraya", 7 }, [85]={ "a North american darter", 21 }, [86]={ "a Nibble fish", 22 }, [87]={ "a Noodlefish", 18 }, [88]={ "a North american freshwater catfish", 36 }, [89]={ "a Oregon chub", 28 }, [90]={ "a Opah", 27 }, [91]={ "a Pink salmon", 123 }, [92]={ "a Porgy", 14 }, [93]={ "a Ponyfish", 18 }, [94]={ "a Oscar fish", 11 }, [95]={ "a Powen", 10 }, [96]={ "a Pacific cod", 20 }, [97]={ "a Pilot fish", 21 }, [98]={ "a Pygmy sunfish", 17 }, [99]={ "a Prickly shark", 32 }, [100]={ "a River shark", 23 }, } -- Handle fishing function fishing_get(fisher) local fishers = getElementsByType( "player" ) for k,fisher in pairs(fishers) do if getPedContactElement( fisher ) and isElement( getPedContactElement( fisher )) and getElementType( getPedContactElement( fisher )) == "vehicle" and getVehicleType( getPedContactElement( fisher )) == "Boat" then -- getPlayerTeam( fisher ) == getTeamFromName( "Civilians" ) -- getElementData( fisher, "Occupation" ) == "Fisher" then -- Verify position if not fish_last_pos[fisher] then fish_last_pos[fisher] = { } fish_last_pos[fisher][1],fish_last_pos[fisher][2],fish_last_pos[fisher][3] = 0,0,0 end local x,y,z = getElementPosition( fisher ) local dist = getDistanceBetweenPoints3D( x,y,z, fish_last_pos[fisher][1],fish_last_pos[fisher][2],fish_last_pos[fisher][3] ) fish_last_pos[fisher][1],fish_last_pos[fisher][2],fish_last_pos[fisher][3] = x,y,z -- Check distance before payment if dist > 0.1 then -- This player is a fisher local ID = math.random(#fish_data) -- exports.GTWtopbar:dm( "You found "..fish_data[iD][1]..", worth "..fish_data[iD][2].."$", fisher, 0, 255, 0 ) exports["NGMessages"]:sendClientMessage("You found "..fish_data[ID][1]..", worth "..fish_data[ID][2].."$", fisher, 255, 0, 0) givePlayerMoney( fisher, fish_data[ID][2] ) end end end end -- Generates a new time function new_timer() if isTimer( fisher_timer ) then killTimer( fisher_timer ) end fish_market = math.random(10000,30000) fisher_timer = setTimer( fishing_get, fish_market, 0 ) end function fish_market( player ) if fish_market_time < 14000 then outputChatBox( "The fish population is excellent now, hurry up, go fishing!", player, 200, 200, 200 ) elseif fish_market_time < 18000 then outputChatBox( "The fish are biting good now", player, 200, 200, 200 ) elseif fish_market_time < 24000 then outputChatBox( "Fish market could have been worse but you might have some luck!", player, 200, 200, 200 ) else outputChatBox( "You need a lot of fishing luck if you think you can get anything right now", player, 200, 200, 200 ) end end addCommandHandler( "fishmarket", fish_market ) -- Set global timers fisher_timer = setTimer( fishing_get, fish_market_time, 0 ) setTimer( new_timer, 3600000, 0 ) On client side , the resource starts normaly but the problem is player doesen't get money for fishing. Error photo: http://imgur.com/cvyceN2.png Hope someone can help me.
  8. Can you explain how to compile image files please?
  9. Thanks , i'll try it soon and i'll answer here. I can't answer everything because i need to go now. About this part of the code for _, nMax in ipairs ( getElementsByType ('player' )) do local nx, ny, nz = getElementPosition ( nMax ) setWeaponTarget ( minigunw ,nMax, 255 ) end It get the position of every player in server and set the minigun target to every player , i don't see any other way to do it.. I'm trying to create a weapon which kill everyone who is near the weapon , but the problem is the weapon work only when i'm alone in the server. When someone else enter the weapon doesn't make any damage,the weapon wasn't visible to all players before but with triggerClientEvent i solved that problem. As i said, i'll try that you said later and i'll answer.
  10. Thanks for trying to help me, but this isn't what i want. I'll continue in creating this if you know what's wrong please tell me.
  11. The problem still continue. help
  12. Ok , i found a way to fix this. The minigun is created now when you write /minigun and they are visible to all players. But the problem is they still doesen't make damage. Help. No errors in debugscript 3 now. Here is a screenshot of the problem, http://imgur.com/r3iIFiM.png
  13. So , the script works on clientside i mean it create a weapon and attact everyone who is near. But the problem is , the weapon isn't visible to all players and doesen't make any damage. The weapon is visible to me and damage me when i'm alone in server. But when someone else enter the weapon isn't visible to him and doesen't damage him. A friend said me i should try to trigger the event from clientside and it would work. But it doesen't work,the weapon isn't created. Hope someone can help me. Debugscript3: ERROR: Server is triggered server side,but not added on clientside. addEvent("onPlayerCreateMiniGun",true) addEventHandler("onPlayerCreateMinigun",root, function () local xx,yy,zz = getElementPosition ( localPlayer ) local minigunw = createWeapon ( 'minigun', xx, yy, zz +1 ) setWeaponClipAmmo ( minigunw,99999) setWeaponState ( minigunw,"firing") setWeaponProperty( minigunw, "fire_rotation", 0, -30, 0 ) for _, nMax in ipairs ( getElementsByType ('player' )) do local nx, ny, nz = getElementPosition ( nMax ) setWeaponTarget ( minigunw ,nMax, 255 ) end end) function greetingCommand ( playerSource, commandName ) triggerClientEvent ("onPlayerCreateMiniGun", playerSource, "Hello World!" ) end addCommandHandler ( "minigun", greetingCommand )
  14. Looks cool,maybe you should create a map for duels.
  15. True, but there are 13131 same resources in community. Maybe create something new?
  16. Wrong board https://forum.multitheftauto.com/viewforum.php?f=177
  17. I think he mean, if type of script isn't definied in meta then the script will be server side.
  18. local theMarker = createMarker(-292.40191650391, 1170.1153564453, 20.00,"cylinder",1.3, 255, 255, 255) for i,v in ipairs(getElementsByType("player"))do setElementData(v, "invincible", false) end function VaccineMeh(Player,mD) if ( getElementType (Player) == "player") and mD then if isPedInVehicle (Player) then return outputChatBox("", Player) end setElementData(Player, "invincible", true) outputChatBox("You're Now Vaccinated Against Zombies!", Player) end end end function onWasted() if getElementData(source, "invincible", true) then setElementData(source, "invincible", false) end end addEventHandler( "onMarkerHit", theMarker, VaccineMeh) addEventHandler("onPlayerWasted", root, onWasted) addEventHandler("onPlayerSpawn", root, onWasted) addEventHandler("onPlayerDamage", root, function() if getElementData(source, "invincible") then cancelEvent() end)
  19. This gamemode can be created in 15-20 minutes easy.
  20. xeon17

    Zona

    Yes Feche1320 I found these functons https://wiki.multitheftauto.com/wiki/GetZoneName https://wiki.multitheftauto.com/wiki/GetElementZoneName
  21. xeon17

    Zona

    Are there some functions to get zonecolor,name,createzone etcetc. Also Events for Zones. I don't mean radarareas , i seached on wiki but i didn't found anything.
×
×
  • Create New...