Jump to content

mrvicio

Members
  • Posts

    37
  • Joined

  • Last visited

Everything posted by mrvicio

  1. dont get mad of me if my gamemode includes 10 resources, and each one have an (if statement) one single time, when i restart my gamemode it will run 100 times: S, thats what i dont like, but if im wrong tell me, i can make mistakes too by the way, the element on the EventHandler dont work, it dont do anything
  2. because i don't want to do a comparison on every resource that start,that is inefficient way, i must attach the handler to the specific resource but i dont know how
  3. Jaysds1 got the idea of (i dont want to use "IF" ) let me try and i will come back
  4. hi all there is a way to make this script without the if? addEventHandler ( "onResourceStart",getRootElement() , function(res) if getResourceName ( res )=="scoreboard" then restartResource (getThisResource ()) end end) i have tried something like as the example below, but it dont work addEventHandler ( "onResourceStart",getResourceFromName("scoreboard") , --i know that getResourceFromName("scoreboard") is not an element, but its only referential of what i want =p function(res) restartResource (getThisResource ()) end) im trying to make the script the most eficient posible
  5. hi alll why it gives me Error? function savePlayerData(thePreviousAccount, theCurrentAccount) outputDebugString(getElementType (getPlayerAccount ( source )))--it obiusly must return "account", but gives me an EROR addEventHandler("onPlayerLogout",getRootElement(), savePlayerData)
  6. ahh ok so many thanks to SDK and all who try to help me!
  7. addEventHandler("onPlayerLogin", getRootElement(), function() executeCommandHandler(source, "debugscript", 3) end) that don't give any errors, but it doesn't work either
  8. hi all, im trying to get the "debugscript 3" inmediatly after connect, how can i do this? i have tried on client side: executeCommandHandler ( "debugscript","3") --and executeCommandHandler ( "debugscript 3") and on server side addEventHandler ( "onPlayerJoin", getRootElement(), function() executeCommandHandler(source,"debugscript 3") --and executeCommandHandler(source,"debugscript", "3") end) and any of that functions works How can i do that?
  9. i have tested both, clien-side and serverside, and it didnt work, im the only one?
  10. hi all this is my first post ^^ im trying to cancel the event "onTrailerAtach" addEventHandler("onTrailerAtach",getRootElement(),function() cancelEvent() end) but to me, it doesnt work, someone have tried it?
×
×
  • Create New...