justn Posted July 7, 2014 Posted July 7, 2014 Hi, im working on a voteredo script, how do i check, when a player hits the hunter, if hes the only person alive and with a hunter, then the map will restart ? and if everyone dies, the map restarts. Thanks. Datastore - Store data to a database quickly. (Useful for saving scripted tables)
MTA Team botder Posted July 7, 2014 MTA Team Posted July 7, 2014 https://wiki.multitheftauto.com/wiki/Resource:Race The race resource has a nice event for that purpose: onPlayerPickUpRacePickup You have to use the parameter vehicleModel to check if the new vehicle will be a hunter (== 425). GitHub: Debug Console • MTA-Discord Relay Scripting: How to draw a line chart with DirectX functions? • Doppler Effect in MTA • Get the client's FPS • Customizable Blur Shader
justn Posted July 7, 2014 Author Posted July 7, 2014 I know how to use that.. i mean, how to check, if that player is the only person is alive ? and how to see when everyone dies, so the map can restart? Datastore - Store data to a database quickly. (Useful for saving scripted tables)
Max+ Posted July 7, 2014 Posted July 7, 2014 addEvent ( 'onPlayerPickUpRacePickup' , true ) addEventHandler ( 'onPlayerPickUpRacePickup' , root, function ( pickupType, vehicleModel, mapInfo ) local alivePlayers = getAlivePlayers() info = mapInfo.modename if info == "Destruction derby" then if #alivePlayers == 1 and ( pickupType == 'vehiclechange' and vehicleModel == 425 ) then --- do something end end end ) - New , Kill System - New, GameMode Intro - Leve / Exp System - New nametag showing style - New , Hud For Players - Skin Selection from SA-MP - Money System / Buy Weapons - Drop Weapons - New, Flood System - New , Group Assign - Gun license For Weapons - Random Rule System For Money
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