AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Action before changing map (https://forums.alliedmods.net/showthread.php?t=54029)

Nican 04-15-2007 15:11

Action before changing map
 
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 :D

VEN 04-16-2007 06:41

Re: Action before changing map
 
Yes it's possible. Tell me for which module (engine or fakemeta).

Nican 04-16-2007 16:03

Re: Action before changing map
 
Hmm engine

VEN 04-17-2007 07:20

Re: Action before changing map
 
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 }

Nican 04-17-2007 16:19

Re: Action before changing map
 
+ karma

You are the king of amxx :D


All times are GMT -4. The time now is 06:40.

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