Jump to content

XetaQuake

Members
  • Posts

    561
  • Joined

  • Last visited

Everything posted by XetaQuake

  1. yea pleas, it would be great when the player also drop the weapons!
  2. {'btn', id='Report', onclick=openAdminReport}, local localPlayer = getLocalPlayer ( ) function openAdminReport() executeCommandHandler( "report", localPlayer ) end
  3. ah pleas help me, its my last problem at this time for my gamemode come on pleas when i press the button noting happens, and i cant see any errors, warnings etc the script have in my eyes no errors...realy strange
  4. really nice! it is possibly to make it saved when the server are restart? i think the best way is to save the players money by serial (by serial = no login) in a file (not database)
  5. ok i have test and learning a little bit can somebody tell me why this dont work: local localPlayer = getLocalPlayer ( ) function openAdminReport() executeCommandHandler( "report", localPlayer ) end and i cant see any errors, warnings etc ;( i hope for help
  6. thanks szlend! thats works i am wondered that the problem was not the killtimmer, but now i have learning and yes you are right its better i read a little bit more on the wiki and to answer your question: the marker and colshape are from a marker+teleport script thanks for all thread finish (for me ^)
  7. oops sorry Bad argument @ 'killTimer' - Line: 17
  8. ahhh okay thanks OnColshapeLeave is good! i get a warning when i leave the marker and the money dont stop, the problem are on line 17: killTimer( timers[ leaveElement ] ) i have already try to change the line a bit with some possibles, but that don't have solved the bug a last help?
  9. yeh! ^^ this is my thread and here is my currently full code, so PLEAS peaple test it on own server with 2 players in the marker, than you can see the problem. i dont know how to exlain this problem (or to fix it) local timers = { } function Place(name) if name ~= getThisResource() then return else local marker = createMarker ( -1025.5623779297, 457.65173339844, 14, "cylinder", 4, 0, 100, 200, 250 ) end end function Money( hitElement, matchingDimension) if ( getElementType ( hitElement ) == "player" ) then timers[ source ] = setTimer( givePlayerMoney, 1000, 0, hitElement, 10 ) end end function money_stop () killTimer( timers[ source ] ) end Col = createColSphere ( -1025.5623779297, 457.65173339844, 14, ) addEventHandler ( "onColShapeHit", Col, Money ) addEventHandler ( "onColShapeLeave", Col, money_stop) addEventHandler ( "onResourceStart", getRootElement(), Place) the marker are on the airport, second city on the end of the starting area
  10. hi, i get on the FreeRoam GUI two errors this are not so important because all work too, but it is a little bit spawn in the log... here are the 2 "errors": ERROR: fr_server.lua:303: attempt to index field '?' (a nil value) ERROR: fr_server.lua:320: attempt to index field '?' (a nil value) and here are line 303 and line 320: Line 303 if g_VehicleData[source].timers.fire then Line 320 if not g_VehicleData[source].timers.fire then the errors are appearance when a player go in a vehicle or exit a vehicle somebody a idea to fix this?
  11. good idea but this dont work so good, because: when only 1 player go in the marker all working good, and when i go out of the marker, i get no money - perfect but: when 2 players in the marker, i dont only get money when the first player that joined the server are in the marker, and when the player go out of the marker, i get no money too it is realy not easy to explain the problem...i hope somebody know a fix all realy strange
  12. hmm, it is not possibly to make this server side too? because i dont know to make ALL client side...
  13. hi again i have found a bug ;/ when two players are in the marker the player get every time money! not only when there are in the marker here my currently code i use: function Place(name) if name ~= getThisResource() then return else local marker = createMarker ( -1025.5623779297, 457.65173339844, 14, "cylinder", 4, 0, 100, 200, 250 ) end end function Money( hitElement, matchingDimension) if ( getElementType ( hitElement ) == "player" ) then timer = setTimer( givePlayerMoney, 1000, 0, hitElement, 10 ) end end function money_stop () killTimer (timer) end Col = createColSphere ( -1025.5623779297, 457.65173339844, 14, 4 ) addEventHandler ( "onColShapeHit", Col, Money ) addEventHandler ( "onColShapeLeave", Col, money_stop) addEventHandler ( "onResourceStart", getRootElement(), Place) have anybody a idea to fix this? i think the problem is anywhere on killTimer
  14. dont work, no errors, no window, no warnings sorry but was is a player-argument?
  15. thanks for help @ all! now i am using the snippets from szlend, and it works great! But thanks for all again!
  16. good idea! so i have this code: function Place(name) if name ~= getThisResource() then return else local marker = createMarker ( -1025.5623779297, 457.65173339844, 14, "cylinder", 4, 0, 100, 200, 250 ) end end function Money( hitElement, matchingDimension) timer = setTimer( giveMoney, 1000, 0, hitElement, 10 ) end function money_stop () killTimer (timer) end Col = createColSphere ( -1025.5623779297, 457.65173339844, 14, 4 ) addEventHandler ( "onColShapeHit", Col, Money ) addEventHandler ( "onColShapeLeave", Col, money_stop) addEventHandler ( "onResourceStart", getRootElement(), Place) now the script respond when i go in and out of the marker - with two warnings WARNING: money.lua: Bad argument @ 'setTimer' - Line: 8 WARNING: money.lua: Bad argument @ 'killTimer' - Line: 11 and i get no money
  17. but the problem is by givePlayerMoney on the script here is the complete script at this time to help me easier: function Place(name) if name ~= getThisResource() then return else local marker = createMarker ( -1025.5623779297, 457.65173339844, 14, "cylinder", 4, 0, 100, 200, 250 ) end end function Money( hitElement, matchingDimension) givePlayerMoney( hitElement, 10 ) timer = setTimer (Money, 1000, 0, hitElement) -- if you set the second Value (number of repetitions) to 0 the timer will loop through the function every second for ever until you kill the timer with the killTimer function end function money_stop () killTimer (timer) end Col = createColSphere ( -1025.5623779297, 457.65173339844, 14, 4 ) addEventHandler ( "onColShapeHit", Col, Money ) addEventHandler ( "onColShapeLeave", Col, money_stop) addEventHandler ( "onResourceStart", getRootElement(), Place) my problem:
  18. nice! can you pleas say me the client side version from this?: function openAdminReport() executeCommandHandler ( "report", playerSource ) end
  19. hi, i need a clientside function that write in the chat by the player why?: i have a GUI script (not by me) and this is complete client side, now i want to build in a option window from this GUI script a button like "report". so players can press this button and then the report window from admin.zip open so that player can report my idea: a function that write /report in the chat box (or report in the console) that this report window will be open dont know what i mean? than connect to any server and write /report in the chat box question: can somebody help me with this? or is this at this moment not possibly?
  20. nobody a idea to fix this server killer? ^^
  21. hi hankey, lol thanks for help but this is the ULTIMADE Server killer this was so funy: first, i go in the marker and yea, all working pretty, but then: 0 - 10 - 20 - 40 - 80 - 160 - 320 .... then the game run with 10 FPS, noting work and the server console spamm 10.00000 errors in 0.5 seconds here the spamm error: Bad 'element' pointer @ 'givePlayerMoney'(1) - Line: 8 //EDIT: i have forgotten to say that when i go out of the marker, i get money again and again
  22. thanks mabako and Ace_Gambit it works now i dont have knew the hitElement, matchingDimension stuff now i try to make this in a timer, so when i go in the marker, i want to get 1000 Money every 1 second so i have trying this already: function Place(name) if name ~= getThisResource() then return else local marker = createMarker ( -1025.5623779297, 457.65173339844, 14, "cylinder", 4, 0, 100, 200, 250 ) end end setTimer(Money, 1000, 1, getRootElement) function Money( hitElement, matchingDimension) givePlayerMoney( hitElement, 10 ) end Col = createColSphere ( -1025.5623779297, 457.65173339844, 14, 4 ) addEventHandler ( "onColShapeHit", Col, Money ) addEventHandler ( "onResourceStart", getRootElement(), Place) but it dont work, so i have try simple differents: setTimer(Money, 1000, 1, source) or function Timer( hitElement, matchingDimension) setTimer(Money, 1000, 1, source) end or function Timer( hitElement, matchingDimension) setTimer(Money, 1000, 1, hitElement) end but all this dont work, what make i wrong?
  23. so i have a next problem i have a place with a marker, and when i go in it, i want to get money, but i dont get the money (the marker are to see ) here is my code: function Place(name) if name ~= getThisResource() then return else local marker = createMarker ( -1025.5623779297, 457.65173339844, 14, "cylinder", 4, 0, 100, 200, 250 ) end end function Money( player ) givePlayerMoney( source, 10000 ) end Col = createColSphere ( -1025.5623779297, 457.65173339844, 14, 4 ) addEventHandler ( "onColShapeHit", Col, Money ) addEventHandler ( "onResourceStart", getRootElement(), Place)
  24. thanks, now it works it is possibly to remove the blockade to spawn more then one ramp in the same time?
  25. <script src="ramp.lua" type="server" /> yep, it is server side
×
×
  • Create New...