Jump to content

mrvicio

Members
  • Posts

    37
  • Joined

  • Last visited

Everything posted by mrvicio

  1. that dificult is? maybe i need to learn a little of c++ But Thanks
  2. as the title says. . . how can i make functions that i can call from any resource without the need of the function (call)?? Thanks afterwards
  3. thanks my friend, but that will be the second step
  4. so many thanks my friend, i didnt know that cars have elementData
  5. hi all again! my question now is, how can i get the position of a vehicle where they respawn, as in the *.map file it is posible? Thanks!
  6. nothing, just asking if there are better ways but thanks
  7. hi all, there is a way to get the elements near a player without using a colShape?
  8. so many thanks my friend I love you!
  9. hi all my friends!! my problem today is to add a column in scoreboard-resource with an spesific size, how can i do that? im calling with call(getResourceFromName("scoreboard"), "addScoreboardColumn", "Job") Thanks The Job column must show "Looking for Job" but is too small
  10. What its the diference betwen a ped with setPedStat(energy, 0) and setPedStat(energy, 1000) i know that argunments of "setPedStat" are not like that, but you know what i mean just want to know the the diference about that 2 stats
  11. thanks for you two!!! thanks a lot!! i got my brain clean
  12. hi all again as the title says. . . whats mean (. . .)? like in this function table.find(t, ...) thanks before hand
  13. hi all i have a question about the effects of stamina and energy in the stats? what they do?
  14. I mean in res1 there is addEventHandler("onResourceStart", res2, dosomething) and then res2 is stopped. Then when res2 starts again the addEventHandler("onResourceStart", res2, dosomething) will be triggered?
  15. Hi all, i have a doubt res = resource if i have a "addEventHandler" in the res1 atached to a resource-element (res2), and this resource stop when the res2 start again with a diferent "elementDataxxx", the EventHandler above will work?
  16. resuelto Era que al reiniciar el resourse scoreboard, llamaba esa funcion inmediatamente, sin haberse cargado completamente el resource tuve que ponerle setTimer a la funcion call
  17. buenas amigos por que me sale este error cuando agrego la columna al score board?
  18. not for me friend well i will try a few more things and im done with this. Thanks to all who has helped me. Thanks!!
  19. so many thanks my friends i didnt knnow abouth element browser and savemapdata, it will be usefull, Thanks!
  20. hi friends! any little idea to dump my element tree to a xml file?
  21. let me explain better Event handlers have 3 variables addEventHandler(var1,var2,var3) ok? var1 is the name of the event var3, YES VAR3! is the name of the function to execute when the event is triggered and var2, is the element that the eventHandler must be attached, and the event only will trigger the fuction when the event occurs on the element attached, in this case "var2", or childs of var2(attachedElement). im just looking the element that i must attach to my EventHandler in this case var3, but in My case, something related to the elementResourceScoreboard because lot of peoples recomend me to use the element "getResourceRootElement(getResourceFromName("scoreboard"))" i tried the line below addEventHandler("onResourceStart",getResourceRootElement(getResourceFromName("scoreboard")),nameOfMyFunction) but it dont work, because of that, i said that the element "getResourceRootElement(getResourceFromName("scoreboard"))" dont work in my EventHandler any doubt?
  22. Thanks! John_Michael I had not thought of only add the colum calling the scoreboard, is has improve efficiency, now only left the element that i must attach to the handler remeber, the element below dont work getResourceRootElement(getResourceFromName("scoreboard")-- <<<---Dont work it dont get launched
  23. i said before im thinking that it is imposible without an if statement im trying to restart "legalsystem-resource" when "scoreboard-resource" start
  24. y have my resource "legalsystem" and its its the code example call(getResourceFromName("scoreboard"), "addScoreboardColumn", "WantedLevel") function player_Wasted ( ammo, attacker, weapon, bodypart ) if ( attacker ) then if ( getElementType ( attacker ) == "player" ) then local wantedLevel = getPlayerWantedLevel ( attacker ) if wantedLevel < 6 then setPlayerWantedLevel ( attacker, 1+wantedLevel ) end setElementData ( attacker, "WantedLevel", getElementData(attacker,"WantedLevel")+1 ) -- refresh WantedLevel scoreboard end end end addEventHandler ( "onPedWasted", getRootElement(), player_Wasted ) addEventHandler ( "onResourceStart",getRootElement() , function(res) if getResourceName ( res )=="scoreboard" then restartResource (getThisResource ()) end end) without the evenHandler "onResourcestart" when the resource scoreboard restart, it dont show anymore the table "WantedLevel" in the scoreboard, because this resource "legalsystem" must be restarted in a few words i want when the resourse scoreboard start, restart legalsystem resourse(this). im writing this script in the legalsystem resource any more questions?
×
×
  • Create New...