#1ERuPTiON Posted July 5, 2014 Posted July 5, 2014 Hey , I don't know if this should go to scripting section or maps, but more scripting So on every map change i want it to say who changed the map in the chatbox. But in the wiki, it doesn't have any event for mapchange , if you find it please send me
Addlibs Posted July 5, 2014 Posted July 5, 2014 I don't think it is possible to find out who changed the map unless you do some extra scripting to make a custom event being called when someone starts a resource / changes the map. Previously known as MrTasty.
Max+ Posted July 6, 2014 Posted July 6, 2014 Exactly it's a custom event , what gameMode do you to get the map Changing ? - 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
#1ERuPTiON Posted July 7, 2014 Author Posted July 7, 2014 Exactly it's a custom event ,what gameMode do you to get the map Changing ? tdma , or even tactics .. aren't maps counted as resources? if so I want it to be on the resource start .. I don't know how to do this
Max+ Posted July 7, 2014 Posted July 7, 2014 i Created This , Dont Know if it will work or not , addEventHandler ( 'onResourceStart',root, function ( resource ) if getResourceInfo ( resource,'gamemodes' ) == 'race' and getResourceInfo ( resource,'type' ) == 'map' then if hasObjectPermissionTo(player, "function.setPlayerMuted", false) and getResourceState ( resource ) == 'starting' then triggerEvent ( 'onServerMapStart',resourceRoot ) end end end ) addEventHandler ( 'onServerMapStart',root, function ( ) outputChatBox(getPlayerName(getPlayerAccount(getAccountName( source )).. 'Started The Map ' ,255, 255, 0 )) end ) --ServerSide , and Change this 'race' to your GameMode type , - 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
Arnold-1 Posted July 7, 2014 Posted July 7, 2014 i Created This , Dont Know if it will work or not , addEventHandler ( 'onResourceStart',root, function ( resource ) if getResourceInfo ( resource,'gamemodes' ) == 'race' and getResourceInfo ( resource,'type' ) == 'map' then if hasObjectPermissionTo(player, "function.setPlayerMuted", false) and getResourceState ( resource ) == 'starting' then triggerEvent ( 'onServerMapStart',resourceRoot ) end end end ) addEventHandler ( 'onServerMapStart',root, function ( ) outputChatBox(getPlayerName(getPlayerAccount(getAccountName( source )).. 'Started The Map ' ,255, 255, 0 )) end ) --ServerSide , and Change this 'race' to your GameMode type , This is bullshit, please learn more before teaching other people. just use onGamemodeMapStart, but, if you want it to output who changed the map, you must make some extra scripting. add to the function of the button you're using for map set this: check the map name variable and replace it with mapName variable in the script. triggerServerEvent("mapChangeOutput",localPlayer,mapName) and add this anywhere serverside: function outputMapChange(name) outputChatBox(getPlayerName(source).."Changed the map to: "..name..".",root,200,100,100) end addEvent("mapChangeOutput",true) addEventHandler("mapChangeOutput",root,outputMapChange) Ingame Name: Arnold If you need my help, contact me on Skype @bshr.ara NOTE:DO NOT ASK ME FOR SCRIPTS, ASK ME FOR HELP
Max+ Posted July 7, 2014 Posted July 7, 2014 i Created This , Dont Know if it will work or not , addEventHandler ( 'onResourceStart',root, function ( resource ) if getResourceInfo ( resource,'gamemodes' ) == 'race' and getResourceInfo ( resource,'type' ) == 'map' then if hasObjectPermissionTo(player, "function.setPlayerMuted", false) and getResourceState ( resource ) == 'starting' then triggerEvent ( 'onServerMapStart',resourceRoot ) end end end ) addEventHandler ( 'onServerMapStart',root, function ( ) outputChatBox(getPlayerName(getPlayerAccount(getAccountName( source )).. 'Started The Map ' ,255, 255, 0 )) end ) --ServerSide , and Change this 'race' to your GameMode type , This is :~, please learn more before teaching other people. just use onGamemodeMapStart, but, if you want it to output who changed the map, you must make some extra scripting. add to the function of the button you're using for map set this: check the map name variable and replace it with mapName variable in the script. triggerServerEvent("mapChangeOutput",localPlayer,mapName) and add this anywhere serverside: function outputMapChange(name) outputChatBox(getPlayerName(source).."Changed the map to: "..name..".",root,200,100,100) end addEvent("mapChangeOutput",true) addEventHandler("mapChangeOutput",root,outputMapChange) onGamemodeMapStart ؟ and if he doesn't have this event ? i suggest he call the mapManger to check if the map changed or not , - 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
Arnold-1 Posted July 7, 2014 Posted July 7, 2014 I gave him the script, no actual need for onGamemodeMapStart, but anyway, it's a map manager event, and almost every scripter includes it in his gamemode. Ingame Name: Arnold If you need my help, contact me on Skype @bshr.ara NOTE:DO NOT ASK ME FOR SCRIPTS, ASK ME FOR HELP
#DRAGON!FIRE Posted July 7, 2014 Posted July 7, 2014 u mean if change from admin panel ? To Contact Me at Skype : [email protected]
Max+ Posted July 7, 2014 Posted July 7, 2014 u mean if change from admin panel ? no he mean like BaseMode if the admin start the map in f8 like / arena 20 outputChatBox(adminName.. has Started the map ) he want get the name of the admin started the map .. - 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
#DRAGON!FIRE Posted July 7, 2014 Posted July 7, 2014 use: onPlayerCommand To Contact Me at Skype : [email protected]
#1ERuPTiON Posted October 13, 2015 Author Posted October 13, 2015 i Created This , Dont Know if it will work or not , addEventHandler ( 'onResourceStart',root, function ( resource ) if getResourceInfo ( resource,'gamemodes' ) == 'race' and getResourceInfo ( resource,'type' ) == 'map' then if hasObjectPermissionTo(player, "function.setPlayerMuted", false) and getResourceState ( resource ) == 'starting' then triggerEvent ( 'onServerMapStart',resourceRoot ) end end end ) addEventHandler ( 'onServerMapStart',root, function ( ) outputChatBox(getPlayerName(getPlayerAccount(getAccountName( source )).. 'Started The Map ' ,255, 255, 0 )) end ) --ServerSide , and Change this 'race' to your GameMode type , well I took long to reply, but now I need this script again and it's not working for the gamemode tactics. Or you can say Basemode.
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