manve1 Posted September 22, 2012 Share Posted September 22, 2012 Is there a way i could find out who won round in DD maps? i didn't try to script it and i didn't start scripting one script cuz i need a way that i could find out who won the DD round. Link to comment
Castillo Posted September 22, 2012 Share Posted September 22, 2012 You mean DD rounds in "race" resource? Link to comment
manve1 Posted September 22, 2012 Author Share Posted September 22, 2012 Yes like when u win race DD round. Link to comment
50p Posted September 22, 2012 Share Posted September 22, 2012 Try onMapStarting to store information about the current map and onPlayerFinish and check if the player's rank is 1. You may have to look into race resource to see what mapInfo table holds when fired to onMapStarting. Link to comment
manve1 Posted September 22, 2012 Author Share Posted September 22, 2012 Try onMapStarting to store information about the current map and onPlayerFinish and check if the player's rank is 1. You may have to look into race resource to see what mapInfo table holds when fired to onMapStarting. sorry, but i don't get what you mean Link to comment
Castillo Posted September 22, 2012 Share Posted September 22, 2012 Go to: "race/modes/destructionderby.lua" and search for the function: "DestructionDerby:handleFinishActivePlayer" And after: if #activePlayers == 1 then Place: triggerEvent ( "onPlayerDestructionDerbyWin", activePlayers [ 1 ] ) Then you can use this new event: addEvent ( "onPlayerDestructionDerbyWin", true ) addEventHandler ( "onPlayerDestructionDerbyWin", root, function ( ) outputChatBox ( getPlayerName ( source ) .." has won the round!" ) end ) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now