Raised This Month: $51 Target: $400
 12% 

Action before changing map


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 04-15-2007 , 15:11   Action before changing map
Reply With Quote #1

Is there someway to remove trigger_changelevel and open a vote instead?

And also if possible take the "map" keyvalue from trigger_changelevel, i tried to use get_keyvalue, but it did not work D:


Thank you
__________________
http://www.nican132.com
I require reputation!
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
VEN
Veteran Member
Join Date: Jan 2005
Old 04-16-2007 , 06:41   Re: Action before changing map
Reply With Quote #2

Yes it's possible. Tell me for which module (engine or fakemeta).
VEN is offline
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 04-16-2007 , 16:03   Re: Action before changing map
Reply With Quote #3

Hmm engine
__________________
http://www.nican132.com
I require reputation!
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
VEN
Veteran Member
Join Date: Jan 2005
Old 04-17-2007 , 07:20   Re: Action before changing map
Reply With Quote #4

Quote:
take the "map" keyvalue from trigger_changelevel
In pfn_keyvalue forward use copy_keyvalue function its prototype is
Code:
native copy_keyvalue(szClassName[],sizea,szKeyName[],sizeb,szValue[],sizec);
Check for "trigger_changelevel" classname and for "map" key name:
Code:
if (equal(szKeyName, "map") && equal(szClassName, "trigger_changelevel"))     // then cache szValue to a some global string array

Quote:
Is there someway to remove trigger_changelevel and open a vote instead?
Hook touch like that:
Code:
register_touch("trigger_changelevel", "player", "your_function")
and in your function:
Code:
public your_function(entity, player) {     // start your vote       // remove your entity with remove_entity if needed       return PLUGIN_HANDLED // this will block changelevel if you don't want to remove entity }

Last edited by VEN; 04-17-2007 at 07:23.
VEN is offline
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 04-17-2007 , 16:19   Re: Action before changing map
Reply With Quote #5

+ karma

You are the king of amxx
__________________
http://www.nican132.com
I require reputation!
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
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 19:00.


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