Jump to content

NotAvailable

Members
  • Posts

    595
  • Joined

  • Last visited

Everything posted by NotAvailable

  1. hiiii Johnniey
  2. createBlip ( x, y, z, 30, 0, 0, 0, 255, getRootElement())
  3. Hi, i forgot how to use triggerClientEvent and triggerServerEvent I've read the wiki 2 times, But it didnt worked. Heres my code: [sERVER SIDE] addEvent("giveM4", true) function giveMeM4(client) if getPlayerMoney (client) >= 1400 then giveWeapon(client, 31, 100) takePlayerMoney(client, 1400) -- outputChatBox("Ka ching!", client, 0, 255, 0) -- TEST MESSAGE triggerClientEvent (thePlayer, "onEnoughMoney", getLocalPlayer()) else local thePlayer = getPlayerFromName ( client ) outputChatBox("You dont have enough money!", client, 255, 0, 0) triggerClientEvent (thePlayer, "onNotEnoughMoney", getPlayerFromName(client)) end end addEventHandler ( "giveM4", getRootElement(), giveMeM4 ) [CLIENT SIDE] wepcol = createColCuboid ( 1495.6212158203, -3100.0891113281, 87.07982635498, 2, 5, 2 ) root = getRootElement() function render() dxDrawText("Press O to buy M4 [Cost: 1400]",329.0,412.0,482.0,425.0,tocolor(255,200,0,255),0.9,"default-bold","left","top",false,false,false) end function enter() addEventHandler("onClientRender", root, render) bindKey( "O", "down", m4) -- outputChatBox("O BINDED", root, 255, 0, 0) end addEventHandler("onClientColShapeHit", wepcol, enter) function leave() removeEventHandler("onClientRender", root, render) unbindKey( "O", "down", m4) -- outputChatBox("O UNBINDED", root, 255, 0, 0) -- TEST MESSAGE end addEventHandler("onClientColShapeLeave", wepcol, leave) function m4(theElement, matchingDimension) triggerServerEvent( "giveM4", getLocalPlayer(),getLocalPlayer()) end local soundsTable = {} soundsTable[1] = "nocash1.mp3" soundsTable[2] = "nocash2.mp3" soundsTable[3] = "nocash3.mp3" function playThaSound() local rand = math.random ( 1, #soundsTable ) playSound ( soundsTable[rand], false ) setSoundVolume(sounds, 0.9) end addEvent( "onNotEnoughMoney", true ) addEventHandler( "onNotEnoughMoney", getRootElement(), playThaSound ) local soundsTable = {} soundsTable[1] = "buyedgun1.mp3" soundsTable[2] = "buyedgun2.mp3" soundsTable[3] = "buyedgun3.mp3" soundsTable[4] = "buyedgun4.mp3" soundsTable[5] = "buyedgun5.mp3" function playThaBuySound() local rand = math.random ( 1, #soundsTable ) playSound ( soundsTable[rand], false ) setSoundVolume(sounds, 0.9) end addEvent( "onEnoughMoney", true ) addEventHandler( "onEnoughMoney", getRootElement(), playThaBuySound ) The error(s): [15:15:25] WARNING: weaponbuy\server.lua:9: Bad argument @ 'getPlayerFromName' [15:15:25] WARNING: weaponbuy\server.lua:11: Bad argument @ 'getPlayerFromName' [15:15:25] WARNING: weaponbuy\server.lua:11: Bad argument @ 'triggerClientEvent' Regards, Jesseunit
  4. I've edited JasperNL's RPG script its bug free.
  5. BTW Remove in the Zombies meta file: <include>scoreboard</include> Or something familiar looking like that. EDIT: Or you could change scoreboard to dxscoreboard
  6. Download dxscoreboard and replace: scoreboard with: dxscoreboard then it should work. Like this: call(getResourceFromName("dxscoreboard"), "scoreboardAddColumn", "Zombie kills") --ADDS TO SCOREBOARD
  7. Yeh, i know that, But how to make it when there are 2 texts 1 will be moved a bit up
  8. Hi, I want to create a custom chatbox for my server. But i dont know how to. I want something like this: Does someone know how to create one? Regards, Jesseunit
  9. omg, thanks man its working. lua knowledge + 10%
  10. Nope i dont have any errors, Maybe its causing cause i enter the same marker
  11. Hmmm... its still not working Picture: Wheres the van?
  12. Aaah. thanks. i was getting a headache
  13. You know, im 1 of those 'nice' scripters
  14. heres a part of my script: client: function swatCar() guiSetVisible(window, false) showCursor(false) triggerServerEvent( "spawnSWAT", getLocalPlayer(),getPlayerName( getLocalPlayer() ) ) end server: addEvent("spawnSWAT", true) function carSwat(playerName) local guy = getPlayerFromName( playerName ); local x, y, z = getElementPosition ( guy ) local r = getPedRotation ( guy ) vehicle = createVehicle ( 601, x, y, z, 0, 0, r ) warpPedIntoVehicle ( guy, vehicle ) outputChatBox("S.W.A.T spawned!", guy, 0, 255, 0) end addEventHandler ( "spawnSWAT", getRootElement(), carSwat )
  15. Hi, Im learning how to use: setElementData getElementData So me & my friend created a delivery man job. the purpose of setElementData in this script is that the player can only spawn 1 van. If he tries to spawn another 1 the old 1 will be destroyed and there will be a new Van spawned. But i have 1 problem. When i step in the marker there will be no van spawned and i get this message: [DELIVERY MAN]Your old van is succesfully destroyed and there is a new Van spawned! This is my code: DJmarker = createMarker ( 83.796, -149.400, 1.684, "cylinder", 1, 255, 0, 0, 100, getRootElement() ) DJblip = createBlip ( 83.796, -149.400, 1.584, 51 ) function startMission (player) blip0 = createBlip ( 269.329, -220.570, 0.427, 41 ) blip1 = createBlip ( 215.279, 32.975, 1.462, 41 ) blip2 = createBlip ( -60.394, 83.554, 2.136, 41 ) blip3 = createBlip ( -116.719, -319.788, 0.171, 41 ) blip4 = createBlip ( 867.670, -31.795, 62.195, 41 ) setTimer(setElementPosition, 2200, 1, player, 94.952682495117, -162.39546203613, 2.59375 ) setTimer(setElementRotation, 2200, 1, player, 0, 0, 173.87872314453 ) fadeCamera ( player, false, 1.0, 0, 0, 0 ) setTimer ( fadeCamera, 2500, 1, player, true, 1.0 ) TheDV = createVehicle ( 440, 93.857, -164.925, 2.806 ) setElementRotation( TheDV, 0, 0, 270 ) local dlvan = getElementData(player, "got.van" ) if ( dlvan == false ) then setElementData(player,"got.van", TheDV) outputChatBox ( "[DELIVERY MAN]You are now a Delivery man!", player, 0, 255, 0, true ) outputChatBox ( "[DELIVERY MAN]Drive trough the markers to deliver the crates, And earn money.", player, 255, 255, 0, true ) outputChatBox ( "[DELIVERY MAN]Use /quitjob to quit this job.", player, 255, 255, 0, true ) end end addEventHandler( "onMarkerHit", DJmarker, startMission ) function stopjobCommand ( player ) setTimer(setElementPosition, 1000, 1, player, 85.138, -149.441, 2.583 ) setTimer(setElementRotation, 1000, 1, player, 0, 0, 270 ) fadeCamera ( player, false, 1.0, 0, 0, 0 ) setTimer ( fadeCamera, 1100, 1, player, true, 1.0 ) outputChatBox ( "[DELIVERY MAN]You are no longer Delivery man.", player, 255, 0, 0, true ) setTimer(destroyElement, 100, 1, TheDV) destroyElement(blip0) destroyElement(blip1) destroyElement(blip2) destroyElement(blip3) destroyElement(blip4) end addCommandHandler ("quitjob", stopjobCommand) function checkVan (player,matchingDimension) local dlvan = getElementData( player, "got.van" ) if ( dlvan ) then setElementData (player, "got.van", false ) destroyElement(TheDV) destroyElement(blip0) destroyElement(blip1) destroyElement(blip2) destroyElement(blip3) destroyElement(blip4) outputChatBox("[DELIVERY MAN]Your old van is succesfully destroyed and there is a new Van spawned!",player,0,255,0) end end addEventHandler( "onMarkerHit", DJmarker, checkVan ) Can someone help me? Regards, Jesseunit
  16. https://community.multitheftauto.com/index.php?p= ... ls&id=1611
  17. He means that, When you fly above a marker e.g above the clouds. The marker will appear.
  18. Where can i see the anti zombie zone wiki page?
  19. Thanks man its working
  20. i still get the same error. This is the full code: local myMarker = createMarker( -2284.4592285156, 1909.6333007813, 7.9688625335693, "Cylinder", 1, 255, 0, 0, 140) function openForMe(hitElement, matchingDimension) if getElementType ( hitElement ) == "player" then local wanted = getPlayerWantedLevel ( hitElement ) if wanted == 0 then outputChatBox("Are you sure you want to leave Alcatraz?", hitElement, 0, 255, 0) outputChatBox("Say: /leave if u want to leave", hitElement, 255, 200, 0) addCommandHandler("leave", teleportMassive) end end end addEventHandler("onMarkerHit", myMarker,openForMe) function teleportMassive(player, matchingDimension) setElementPosition(player, -2279.3093261719, 1909.4665527344, 8.9688625335693) setElementRotation(player, 270.36642456055) removeCommandHandler("leave") end
  21. Its still not working i get this error: [18:04:24] WARNING: editor_test\misc_S.lua:13: Bad argument @ 'addEventHandler' Heres the code: function openForMe(hitElement, matchingDimension) if getElementType ( hitElement ) == "player" then local wanted = getPlayerWantedLevel ( hitElement ) if wanted == 0 then outputChatBox("Are you sure you want to leave Alcatraz?", hitElement, 0, 255, 0) outputChatBox("Say: /leave if u want to leave", hitElement, 255, 200, 0) addCommandHandler("leave", teleportMassive) end end end addEventHandler("onMarkerHit", myMarker,openForMe) function teleportMassive(player, matchingDimension) local player = getPlayerFromName(player); setElementPosition(player, -2279.3093261719, 1909.4665527344, 8.9688625335693) setElementRotation(player, 270.36642456055) removeCommandHandler("leave") end
  22. 90% of all zombie servers are lagging as hell.
  23. I've tried to fix it again, Even the zombies wont attack me. Its like im invicible.
  24. Lagg or Desynchronization.
×
×
  • Create New...