Raised This Month: $32 Target: $400
 8% 

Solved how to hook up the map exchange event


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 03-27-2019 , 13:09   how to hook up the map exchange event
Reply With Quote #1

Hello, how are you? I hope well!

Can someone tell me how to hook up the map exchange event? For example the admin opened the menu amxx and changed the map, I want to take an action at that specific time. I already tested with plugin_end () and did not succeed.
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/

Last edited by iceeedr; 03-27-2019 at 21:12.
iceeedr is offline
Send a message via Skype™ to iceeedr
E1_531G
Senior Member
Join Date: Dec 2017
Old 03-27-2019 , 14:18   Re: how to hook up the map exchange event
Reply With Quote #2

In AMXX 1.9 (maybe 1.8.3 too, idk) you have:
https://www.amxmodx.org/api/amxmodx/engine_changelevel (call)
and
https://www.amxmodx.org/api/amxmodx/server_changelevel (hook)
__________________
My English is A0
E1_531G is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 03-27-2019 , 14:26   Re: how to hook up the map exchange event
Reply With Quote #3

Quote:
Originally Posted by E1_531G View Post
Note

This is *only* called if the mod itself handles the map change. The
server command "changelevel", which is used by many plugins, will not
trigger this forward. Unfortunately, this means that in practice this
forward can be unreliable and will not be called in many situations.

Note

AMXX 1.8.3 has added the engine_changelevel() function, which will utilize
the correct engine function to change the map, and therefore trigger
this forward.


But thank you anyway.

Edit 1: I have just looked at the 1.9 mapsmenu sma and verified that they use engine_changelevel instead of server_cmd, thanks for the help.
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/

Last edited by iceeedr; 03-27-2019 at 14:41.
iceeedr is offline
Send a message via Skype™ to iceeedr
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:01.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode