Jump to content

NotAvailable

Members
  • Posts

    595
  • Joined

  • Last visited

Everything posted by NotAvailable

  1. Hi, im making an exp script, When you finish a race and u get the Hunter, The EXP script will trigger. But i get 4 errors: [10:24:40] WARNING: raceexp\Untitled 1.lua:9: Bad argument @ 'getPlayerAccount' [10:24:40] WARNING: raceexp\Untitled 1.lua:10: Bad argument @ 'getAccountData' [10:24:40] WARNING: raceexp\Untitled 1.lua:16: Bad argument @ 'setAccountData' I tried to fix it several times but it didnt work. heres the code(server): addEvent( "onPlayerWasted" ); addEventHandler( "onPlayerWasted", getRootElement(), function( killer ) if (killer) and (killer ~=source) then --EXP & RANK GEDOE-- local acc = getPlayerAccount(killer) local accountdata = getAccountData(acc,"exp") if accountdata then setAccountData(acc,"exp",tonumber(getAccountData(acc,"exp"))+1) setElementData(killer,"exp",tonumber(getAccountData(acc,"exp"))+1) outputChatBox("Total exp: ".. tonumber(getAccountData(acc,"exp"))+1,killer,0,255,0) else setAccountData(acc,"exp",1) end end end) Regards, Jesseunit
  2. thanks
  3. thanks, but now im making it so that the player cna buy a weapon of the wall, But it seems to be its not working. server: addEvent("giveM4", true) function giveMeM4(playerName) local guy = getPlayerFromName( playerName ); if getPlayerMoney (guy) >= 1400 then giveWeapon(guy, 31, 100) outputChatBox("Ka ching!", 0, 255, 0, guy) -- TEST MESSAGE else outputChatBox("You dont have enough money!", 255, 0, 0, guy) end end addEventHandler ( "giveM4", getRootElement(), giveMeM4 ) client: wepcol = createColCuboid ( 1495.6212158203, -3100.0891113281, 87.07982635498, 2, 5, 2 ) root = getRootElement() function render() dxDrawText("Press [O] for a M4 (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) -- TEST MESSAGE 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(),getPlayerName( getLocalPlayer() ) ) end end
  4. maybe do: showCursor(false) Instead of: showCursor(false, false)
  5. ok, but now i get a new error: addEventHandler: onClientRender is already handled this is the code: wepcol = createColCuboid ( 1495.6212158203, -3100.0891113281, 87.07982635498, 5, 5, 5 ) root = getRootElement() function enter() local text = dxDrawText("meep",329.0,412.0,482.0,425.0,tocolor(255,200,0,255),0.9,"default-bold","left","top",false,false,false) addEventHandler("onClientRender", root, enter) end addEventHandler("onClientColShapeHit", wepcol, enter) function leave() textDestroyTextItem ( text ) removeEventHandler("onClientRender",root,leave) end addEventHandler("onClientColShapeLeave", wepcol, leave)
  6. Hi, I have a problem. When i enter the colshape the text appears but it disappears after like 100 miliseconds. How can i make it stay and leave when someone enters it and leaves it? this is the code(client): wepcol = createColCuboid ( 1495.6212158203, -3100.0891113281, 87.07982635498, 5, 5, 5 ) function enter() local text = dxDrawText("meep",329.0,412.0,482.0,425.0,tocolor(255,200,0,255),0.9,"default-bold","left","top",false,false,false) end addEventHandler("onClientColShapeHit", wepcol, enter) function leave() textDestroyTextItem ( text ) end addEventHandler("onClientColShapeLeave", wepcol, leave) Regards, Jesseunit
  7. Put it on 'Guarding', They will not follow when a player runs away, They will only shoot.
  8. I´ve just wanted to help players that couldn´t script.
  9. Yeah a green zone.
  10. You should be on the ArmyBots team, Otherwise they attack you.
  11. Well. Its not a green zone its a ´safe´ zone.
  12. Yeah
  13. Welcome! [INFORMATION] This is an anti-zombie zone for players in your server. Example: You have a base but zombies are spawning there. Well, Then just run this resource(Change coordinates first) NOTE: Only players with the SWAT skin can enter. [FEATURES] - Anti-zombie zone - Green radar zone - Only SWAT skin can enter(id: 285) [HOW TO OPEN] Yeah i dont know whats wrong but when you download it it wont be a .ZIP file, So this is how to open: - You need WinRaR - Right-Click on this file(White sheet) - Open As.. - Select: WinRaR [DOWNLOAD] https://community.multitheftauto.com/index.php?p= ... ls&id=1547 Regards, Jesseunit
  14. Yeah ^^ We're working on it
  15. Post updated 29-12-2010
  16. Hi, all! NOTE: Post updated on 29-7-2011 [iNFORMATION] Im currently working on a zombie gamemode, It will be awesome. [WHY DO I MAKE THIS] Well, i'm making this cause there are so much zombie server without a story. [THE MAP] The map will be looking like Fallout 3/Fallout New Vegas. Destroyed buildings, Dynamic weather. There will be tunnels and subway stations filled with monsters And Rebels. When you join for the first time you have 500$ you will need to find items/weapons or you can buy them @Shops(For the lazy people). There are small towns to. [WHEN WILL IT BE RELEASED] The server is developing faster than expected, maybe it gets earlier released [THINGS NEED TO BE CREATED/MAPPED] Barriers Level HUD Models (Buildings etc) Map NPC's (Survivors, Rebels) etc. [JOBS] Im looking for: Mappers People with idea's Scripters Mappers (People that can map realistic things, NO flying stuff.) Modellers (Able to create a demolished building) Testers (You need MTA 1.1) [THE CREW] Developer: Jesseunit Scripter : Jesseunit Scripter : Brasco Mapper : Jesseunit Modeller : Jesseunit Tester : Diall Tester : Qaisjp Tester : Roadrunner Aka. Capone [PICTURES] I'm remaking this HUD for my server: Yes, it's true, this is a real call of duty modern warfare 3 picture [TRAILER] 5 Hidden Messages hidden in this trailer Reveal trailer coming soon. [PROGRESS BAR] [sTATUS] In progress NOTE: This post will be updated!
  17. Im currently working on a barricade system/
  18. try this(server-side): function hobo() local player = getRandomPlayer ( ) givePlayerMoney(player, CASH HERE!) outputChatBox ( getPlayerName ( player ).." Won: CASH NUMBER HERE!" ) end setTimer(hobo, 1000, 0)
  19. ty all it works
  20. still not working, i tried getPlayerFromName. this is the code(client) function sultan() triggerServerEvent("spawnSultan", getLocalPlayer()) end this the server side code: addEvent("spawnSultan", true) function warpIntoCar(playerName) local player = getPlayerFromName( playerName ); local x, y, z = getElementPosition ( player ) local r = getPedRotation ( player ) vehicle = createVehicle ( 560, x, y, z, 0, 0, r ) warpPedIntoVehicle ( player, vehicle ) end addEventHandler ( "spawnSultan", getRootElement(), warpIntoCar )
  21. Ill search for it. Ill reply soon
  22. So what do i need to use then?
  23. Ok, its working but i still have 1 error: ERROR: npanel\panel_s.lua:40: attempt to call global 'getLocalPlayer' (a nil value) How do i fix that
  24. Oh, 1 more problem. Im making an VIP Panel for my server, But how do i trigger the server side event when the VIP clicks on the Spawn button? I tried addEvent, addEventHandler & triggerClientEvent, But it didnt worked. How do i fix that?
×
×
  • Create New...