Jump to content

#Switch

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by #Switch

  1. Thank you guys, it works perfectly! final result: function RaceMode.endMap() if stateAllowsPostFinish() then for i, player in ipairs(getElementsByType("player")) do fadeCamera ( root, false, 3.5, 0, 0, 0 ) -- fades out in 3.5 secs. end gotoState('PostFinish') local text = g_GameOptions.randommaps and 'Next map starts in:' or '' Countdown.create(4, RaceMode.startNextMapSelect, text, 255, 255, 255, 2, 0 ):start() triggerEvent('onPostFinish', g_Root) end end
  2. How? im not a "pro" scripter , could you explain me please?
  3. I've tried to use fadeCamera out when a map ends, but it doesn't work, its a server side script (base.lua from default race gamemode) here's the code: function RaceMode.endMap() if stateAllowsPostFinish() then fadeCamera ( source, false, 5, 0, 0, 0 ) -- fades out to black screen in 5 secs. gotoState('PostFinish') local text = g_GameOptions.randommaps and 'Next map starts in:' or '' Countdown.create(5, RaceMode.startNextMapSelect, text, 255, 255, 255, 2, 0 ):start() triggerEvent('onPostFinish', g_Root) end end i've tried changing arguments but it doesn't work, any idea?
  4. Sure, the scripts (client and server) aren't reloaded/restarted on map change, it just deletes the objects from the previous map and create new ones for the next and showing a picture on the screen for the transition. By the way, the mta progressbar when new map is starting is just because that maps are seperated resources, that race gamemode is starting/stoping. So it will download the files that are from the map resource but the other resources are still running. Hope it's a little more clear i didn't delete timers, i did this local hideTime = 999999 stopingTimer = setTimer(hideDeadImage, hideTime*999999, 1) a friend help me out with server side, so when a map changes it kills timer and images disapear ^^ isn't the most pro solution but works!
  5. WoW such solution!, thank you, it worked, but positions of the line are wrong, it took me a while to understand the code, after i fixed positions, i changed addCommandHandler("dead", showDeadImage) and added a function to show images & line with this: addEventHandler ( "onClientPlayerWasted", localPlayer, function ( ) showDeadImage ( ) end ) it works!, my question is if i remove timers, will the image & line dissapear after the map changes? (its for a Race DM server). i'll try that. @bonsai i won't copy & paste only, i want to learn lua, i already know Pawno (3 years), PHP, HTML & CSS. i guess in some months i'll be able to create much more things with lua, if i get the knowedge
  6. Kinda complicated, i don't get how to apply that function to use it with the image & line
  7. Hi, i've started to learn lua, and i did a script wich shows an image (dxDrawImage) and a line over the image (dxDrawLine), functions works properly, but i want to add an animation for those "objects", when a player die, image and line come up from the bottom of the screen. Here's some code dxDrawLine ( x*1, y*0.944, -x*0.05, y*0.944, tocolor ( 0, 255, 153, 255 ), 2 ) dxDrawImage ( x*0.4, y*0.875, 300, 50, 'images/dead_player.png', 0, 0, -120 ) so when a player die, line & images come up. i don't know how to add this animation.
×
×
  • Create New...