DarkLink
Members-
Posts
610 -
Joined
-
Last visited
Everything posted by DarkLink
-
It worked!! Thanks alot buffalo!! Btw just one more question, its possible to stop a timer inside that timer? Something like: local barFill= setTimer(function() if(guiProgressBarGetProgress(bar1)==100) then killTimer(barFill) hide() return end guiProgressBarSetProgress(bar1, guiProgressBarGetProgress(bar1)+2.5) end, 50, 60) Didnt worked, the timer still continues after my bar was filled.. Thanks in advance!!
-
what do u mean ? I should make, something like local source = source ? before enter the timer ? thanks for ur reply
-
I need to trigger ever for client, and then trigger event back for server, and I am having problems with players that triggered, keep saying on console bad argument Client side: bar1 = guiCreateProgressBar ( 0.4, 0.5, 0.3, 0.1, true ) guiSetVisible(bar1,false) addEvent("mostraBar",true) function progressBar1() guiSetVisible(bar1,true) guiProgressBarSetProgress(bar1, 0) setTimer(function() if(guiProgressBarGetProgress(bar1)==100) then hide() return end guiProgressBarSetProgress(bar1, guiProgressBarGetProgress(bar1)+2.5) end, 50, 60) end addEventHandler("mostraBar", getRootElement(), progressBar1) function hide() outputChatBox("estou aqui2") guiSetVisible(bar1, false) triggerServerEvent("teleportar", getLocalPlayer()) end server side: if(isElementWithinMarker(keyPresser, passagem1)) then triggerClientEvent(keyPresser, "mostraBar", keyPresser) end addEvent("teleportar",true) function makeTeleport() outputChatBox("estou aqui") setTimer(function() if(isElementWithinMarker(source,passagem1)) then setElementPosition(source,x2,y2,z2 +1) end end, 50,1) local tabElm = getAttachedElements(source) setTimer(function() for i, v in ipairs (tabElm) do if (getElementType(v) == 'blip') then if(getPlayerTeam(source) == team_immigrantsSP) then setElementVisibleTo ( v, getRootElement(), true ) end end end end, 3000,1) end addEventHandler("teleportar", getRootElement(), makeTeleport) Can someone clarify me? I read on wiki, about event handlers, the source and the client variables, also tryed with client, but didnt work Keep saying bad argument on isElementWithinMarker(source,passagem1), on the function makeTeleport, I guess is the source variable. Thanks in advance This is killing me
-
it was freezing at 2.5% because guiProgressBarGetProgress(bar1) + 2.5 is calculated only once, on timer initialization, so it sets progress to 2.5 all 40 times. Ahh I see! Thanks, I understand now! But look your solution, stops around 60~70% dont get to 100%, why? Its suppose to fill it.. 2.5 * 40 = 100 Thanks
-
Thanks for ur reply, before I read this, I tryed with: setTimer(guiProgressBarSetProgress, 50, 40, bar1, guiProgressBarGetProgress(bar1) + 2.5) And it was freezing at 2.5%, and I think its the same? Anyway I will try ur solution, thanks. EDIT: It worked, thanks Aibo!!
-
Thanks for ur reply, before I read this, I tryed with: setTimer(guiProgressBarSetProgress, 50, 40, bar1, guiProgressBarGetProgress(bar1) + 2.5) And it was freezing at 2.5%, and I think its the same? Anyway I will try ur solution, thanks.
-
Okay guys, I managed to do this, but the bar fills very fast, right when it gets visible, I made this for: for x= 2.5, 100 do setTimer(guiProgressBarSetProgress, 50, 1, bar1, x) end My idea was, 100/2.5 = 40. So the for will run 40 times, and then 50 ms (of timer) * 40 times of for = 2000ms .. that is 2 seconds, like I want.. But its not working, when bar gets visible, it goes immediately 100% Does some know the problem? Thanks in advance.
-
Never mind, the lua files were on desktop I was making the code on the backup files LOL Thanks anyway
-
Okay guys, I am having some problems here, cant figure it out So I want a progress bar when a player hits marker. that will go from 0 to 100% in 2 seconds I have this: Server Side: if(isElementWithinMarker(keyPresser,marker1) then triggerClientEvent(keyPresser, "showBar", keyPresser) end Client Side: bar1 = guiCreateProgressBar ( 0.4, 0.5, 0.3, 0.1, true ) guiSetVisible(bar1,false) addEvent("showBar",true) function progressBar1() guiSetVisible(bar1,true) setTimer(setProgressBar, 50, 40, bar1, 1) setTimer(guiSetVisible,2000,1, bar1, false) end addEventHandler("showBar", getRootElement(), progressBar1) My problem is that the progress bar doenst appear on screen And I have no errors on console Thanks in advance guys
-
Well the time for injured its nice idea, I like it, maybe I will do it. About the PK thing , I guess I didnt understand it Differents type of policia? I wont do that bro, there will be only one team of police, what I can do is set different weapons for each member of police team Yes about the insider idea, I will definitely, and will be like a corrupt cop or an emigrant undercover, need to think about it Money will be for the entire team, each player wont have money, but the chief of their team will had, want only chief can buy upgrades chief of each team is choosed randomly on start gamemode. Bribing wouldnt work, a emigrant bribe a police.. ok he gives money to the police that is trying to arrest him, but still the police can arrest him after receive the money What could be done with setElementData, would be bribed string and then true, and that police couldnt arrest that emigrant. About the weather, I am waiting for 1.1, so I can make big tornados And will be a bit hard to see mines eheh Thanks for your feedback qaisjp
-
I dont like you, what is your problem with that? He is just trying to do it, and looking for some help, if you dont wanna help just dont post here. And if he cant make it, well then its just to hard for him, not a noobzor . I hate rude guys like you, just saying. This is suppose to be a community, just saying. Sorry about off-topic .
-
Well yes, I figured it out yesterday It worked. Thanks anyway bro
-
Okay so I have one doubt, when player that is inside a vehicle hits a marker. Which is the element that is on the marker? the player or the marker? or both ? Because I am having problems with isElementWithinMarker(element,marker) when a player hits that marker inside a vehicle. Thanks.
-
I would join, but I still have many work to do at borderpatrol gamemode, when I finish it, I can help you Good luck with that !
-
Thanks for your suggestions Wojak So, about the death system, I LIKE the idea! BUT, that would slow down a bit the gameplay of emigrants team, you see? I mean, someone get injured, then a emigrant would need to came back for him.. help him, put in the car and deliver him to the emigrants base.. And I think that would be another problem, a single round would take much more time! Because emigrants couldnt be killed.. they would be always recued. you see? BUT LOOK, its a nice idea!! If we think better about it, and make it more fast, and better equilibrated, we can do it About the money system for the emigrants, I think thats an amazing idea!! And cant be really easy to do, I think we can do something like this: For 1 emigrant on USA, emigrants team win 10$ per hour of GTA San Andreas World. So example, if there are 3 emigrants on USA for about 1 hour each, they team would win 30$, you see? I think that would be nice. Its a brilliant idea! Thanks alot bro!
-
And how can I implement it by myself ? do you know if attachElements function can put an element attached to another, and the element that is attached can shoot ?
-
Hey remp are u still walking around here..? I have some question to you about this gamemode, its possible to glue to a part of the heli..? Like a player crounched on the heli bar ? And then he can shoot ? Does your resource does that? Thanks in advance!
-
I used setTeamColor function to set a color for team members, team X all members with color X and team Y all members with color Y. But dont know how to make it for individual player
-
Yep, usa protect the border like no country Thanks for ur feedback If you have any suggestion, just give me, I am open for all ;D By the way, I updated Features Done List. End today mine system
-
Guys setElementAlpha worked on my objects, MTA Team should edit wiki Future scripters could have the same doubt as me Here it is : https://wiki.multitheftauto.com/wiki/SetElementAlpha Thanks guys.
-
Thanks for urs suggestions guys. I maybe use that gun dealers idea, on start emigrants will have no weapons, just a knife, and then they will buy weapons to use when there are problems. But I need to think how would emigrants team get money, didnt have any idea yet.
-
Pictures Added
-
Thanks I didnt call them mexicans, it will be emigrants team only
-
Thanks bro! Well I will not ofc!! Because I am still alot weak scripting in LUA, so I will post many more times there, dont worry I hope too!! But I will finish I am sure, dreaming with something like this sicne 2008. I really wanna make it! Thanks for ur feedback!! I am open to suggestions guys! Thanks again!
