Jump to content

DarkLink

Members
  • Posts

    610
  • Joined

  • Last visited

Everything posted by DarkLink

  1. Its about a timer starting from 30 to 0 and a gui spawn for teams, and its big I think the solution was, if there were already 2 or more players on server wont trigger onClientResourceStart but would trigger onResourceStart instead , but I cant do this I guess. Thanks castillo
  2. Okay guys I am making my gamemode to work on a server that will continue run it, I mean, when someone win, the resource will be stopped and then can start again. The problem is: When I start my resource and there is no one on server it works fine, but when the gamemode stops, and there is already someone on server, I start the gamemode. And onClientResourceStart will trigger 2xTimes (I am testing with 2 players online when I restart), and that will trigger on of my events on server side, doing things like 2x, and it gets all bugged Timer bugged, spawn gui bugged... well thats the problem. I dont know how to get around this.. Thanks in advance guys!!
  3. Haha, my bad, I'd read "addEvent" as "addEventHandler" . Ye happens alot of times, with many words, when we already tired Happen to me too, when was scripting lol x) Thanks bro.
  4. I will see that animations on that freeroam resource wojak told, thanks guys
  5. hm okay thanks bro, I will give up about this then
  6. Hmm I see, so if I want to use the source of the trigger on the function that is called by the event handler, I cant? Need an extra argument for that source? right? Thanks.
  7. Hmm I get that Thanks blokker! In that case Its like the same to view my last posts (on search), and see if there are replys, I suppose So would be the same But thanks anyway Appreciated
  8. Well bro, I dont know how to do that I guess And this is not such a big thing to be on google, I think
  9. AHHH I got the 2º !! Because he want the "who" argument he type on /getc command !!! I GET IT! Thanks alot Jacob ;D By the way, I didnt get the first, why cant I use ? the function called by the addEventHandler wont have that source ? the source from the trigger? I mean the getLocalPlayer() ? Thanks alot, this is important to me
  10. I think I get it, will try to make something like that . Thanks both
  11. LOL!! Castillo this time jay was right yesterday I was a bit stoned lol, and was a bit confused lol.. dont know why but made an addEvent instead of an addEventHandler, that was suppose to x) So I changed now from addEvent("hadChosenTeam", getRootElement(), inCaseNotChose) to addEventHandler("hadChosenTeam", getRootElement(), inCaseNotChose), and its working hehe. Thanks castillo and jay Appreciated.
  12. Thanks guys, but my question is, couldnt he just trigger the event like: triggerServerEvent("getPlayerCredits", getLocalPlayer()) and then on server side, use: addEvent("getPlayerCredits",true) addEventHandler("getPlayerCredits",root, function (source) outputChatBox(getPlayerName(source) .." has 50000 credits.",root,0,255,0) end) ?? It would work too and no need of player variable? Thanks!!
  13. Okay guys just wanna know something, its there any function on this forum to alert us when someone quote something from us? I mean I write this, then someone quote me here, and I will get an alert that was quote. Or some menu showing quote messages to me that I didnt read yet? I ask this because many time I forget the places where I posted, and then I wont go there more to reply And also because I am too lazy to see my recent posts or to add them to favorites page x) Thanks in advance!!
  14. Hmm Thanks, but if so, why did he use the player variable and why not the source ?
  15. Bro I think here no one will make that for you, because people already are very busy on their projects, and well its the rulles you see? first you need to do something, and then show to us, and people will help more! But I can give you some ideas. I think you need to use: https://wiki.multitheftauto.com/wiki/CreateProjectile And on hit of projectile you make a explosion with https://wiki.multitheftauto.com/wiki/CreateExplosion Well I am not that such a pro, but I think you can make that way. Sorry if I am not right By the way, if you are new to lua I advice you to read this: https://wiki.multitheftauto.com/wiki/Scr ... troduction From here you can have a quickly introduce to lua on mta, and will start to learn how this works If you wanna go more deep, learn scripting guis, those windows you know? here is the tutorial: https://wiki.multitheftauto.com/wiki/Int ... ng_the_GUI I guess its everything , Good luck bro
  16. I already have many things to implement bro, maybe in later versions. But you need to talk about which achievements and how to use point system, would be nice :b By the way, I made a few progress on the gamemode [10-07-2011] --- Fixed small bugs with timer and spawn gui. Also both only appear if gamemode had not started and if there are more than 2 players. --- Fixed something with all gui window, cannot be sizeable or moved now. --- Fixed a minor bugs on passage's teleport, collision problems, and knocked of bike problems. --- Fixed alot of bugs on visibility: Dealers Blips and House Blip only visible to emigrants team. Members of a team can only see blips of enemy team members if they are in 100 meters of distance [will improve this on mta 1.1 with setBlipVisibleDistance] Members of a team can see blips of each one with max distance.
  17. Hei castillo could you explain me something , on that function u write? On server side function couldnt u receive the source of the event that would be that exactly player ? I mean u could use source variable instead of using the player one, right? I say this because u trigger the server event "getPlayerCredits" for the element getLocalPlayer(), so the source will be this local player right? And u could have used it, like this: addEvent("getPlayerCredits",true) addEventHandler("getPlayerCredits",root, function (source) outputChatBox(getPlayerName(source) .." has 50000 credits.",root,0,255,0) end) Right bro? just wanna be clear, so I can understand Lua more Thanks!!
  18. Okay police have handcuffs to arrest emigrants, like we all know. And I wanna know if there is come animation that can do something like that? A ped with hands on back bound with handcuffs..? Well I dont need to see the handcuffs like an object.. just the animation of that ped with hands on back bounded.. Thanks guys!!
  19. Sorry for double post, but can someone help me? Thanks.
  20. Okay guys, I was trying to do something, but I think it doesnt work. So I have a GUI, and in 30 seconds trigger a function to see if player clicked on some button of the GUI or NOT. So I made this function on serverside, that will trigger after 30 seconds: server side: function doesntmatter () if segundos == 0 then triggerClientEvent("hadChosenTeam", getRootElement()) -- will trigger for all the clients, thats what I want. end end on client side: local clicked = false function chooseTeam(button,state) -- this is the function thats is called when any button of the gui is clicked clicked = true end addEvent("hadChosenTeam", true) function inCaseNotChose() if(clicked == false) then outputChatBox("Working.") --I would get this text on chat box if I didnt clicked on any button. end end addEvent("hadChosenTeam", getRootElement(), inCaseNotChose) So guys what is not working here? Do you know something? I guess its about local variables, I cant use them like this, right? Thanks in advance! EDIT: I figured that I can do this with setElementData, but I wanna understand why this method of variable dont work, and if there is other method beside using memory for data. Thans alot guys!
  21. Okay guys, hi there again I have some problems here, I dont know how to implement this. So the mapper makes a map for the gamemode, the gamemode can receive 10 cars to spawn them. THEN, I want to calculate the dynamic situation, I mean, when that gamemode start it will check players on. 1ºIF players on are < 4 then I want 2 cars. 2ºIF players on are > 4 and < 8 then I want 6 cars. 3ºIF players on are > 8 then I want 10 cars. The cars is an example, could be, markers for teleport, spawns, flags.. I know that I can make this by simple conditions and in each one call a function. But that would make a large code!! because on 3º condition, the function would have to had the cars of 1º,2º and 3º condition, you see? And on 2º condition, the function would have to had the cars of 1º and 2º condition, you see guys? I talk here about an example, a dynamic situation with 3 conditions. But look if there are more conditions..? each one would have a function, and would have function very long.. Wont cause lag problems? much code? Is there a way to do this with less code? an optimized solution? Thanks in advance, sorry about my bad english
  22. Ye thats what I said bro on the above post, about the EDF files Thanks for ur reply.
  23. Well I dont need that, I already give much work for people answer my problems on scripting page of the forum eheh So I dont want u do that ! But thanks! I didnt know about that documentation, I will read it, when I start the EDF thingy on my gamemode Thanks bro, appreciated.
  24. I just come here to tell u guys the situation of the gamemode: So I have been learning alot lately from my problems, and I start to understand lua better each day, I fixed some bugs that were on the gamemode since the start, like problems with spawn, sync of lights, people didnt get arrested when it was meant to be, I fixed too a major bug on teleports, and add progress bars to it, its really nice now. And I also fixed a something on the traps, if they collide with them but dont explode them, and then leave them, u wont see them, this was done with leaving the col shape Yesterday and today, I made the goal system for emigrants, I guess its pretty nice. Each emigrants have one bag of weed with them on the start, and depending on the amount of players they need to sell a total of X bags, there are NPCs all over the map where emigrants call sell their bag. After selling those X bags, they can go to the safe house of emigrants and HOLD the position for one real minute (Maybe I will change this timer). The goal of the police its obvious.. arrest as many as you can, and dont let them reach the house Maybe I will improve the goals for the police members, maybe they will need to discover the insider or something.. Its on a good way I guess, but there are many things to do yet, I need to make a good spectator mode, a death system (this will be easy), and then need to do the harder: "make the EDFs files and make the settings of this gamemode" this is very important, so other guys from community can make other maps for this gamemode I also need to remake from scratch the auto-balance, its not good enough. So I wanna thank the all the guys that keep helping me on this, here on forum and on skype! People never give up of teaching, I mean, for me they never had gave up . And thats awesome! So thanks all And lets hope I can finnaly finish this!
  25. Yees! I found out why the substraction on Y!! Because we need to use sin there, and sin is negative between 180 degrees and 360 degrees, right ? Thanks buffalo!
×
×
  • Create New...