AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Get mapname and pause plugin (https://forums.alliedmods.net/showthread.php?t=193533)

dasha 08-20-2012 07:07

Get mapname and pause plugin
 
PHP Code:

public plugin_init() {
    new 
map[32]
    
get_mapname(mapcharsmax(map) )
    if(!
contain(map"de_") ) {
        
        
pause("a""plugin.amxx")
        
server_print("error...")
    }


What's wrong there?

Alka 08-20-2012 07:11

Re: Get mapname and pause plugin
 
Code:

if(containi(map, "de_") == -1) {
    //map name doesn't contain de_
}


dasha 08-20-2012 07:21

Re: Get mapname and pause plugin [solved]
 
Quote:

Originally Posted by Alka (Post 1776900)
Code:

if(containi(map, "de_") == -1) {
    //map name doesn't contain de_
}


Thankyou! :fox:

ConnorMcLeod 08-20-2012 12:21

Re: Get mapname and pause plugin
 
Better to remove that plugin from plugins.ini, and to declare it only in configs/maps/plugins-de.ini

dasha 08-20-2012 17:20

Re: Get mapname and pause plugin
 
Quote:

Originally Posted by ConnorMcLeod (Post 1777095)
Better to remove that plugin from plugins.ini, and to declare it only in configs/maps/plugins-de.ini

Agreed. But this is going to be a mod. So that is just a part of the plugin. :fox:
The de_ is just an example, it be going with another prefix.

Anyway, thanks! :)

Alka 08-20-2012 20:10

Re: Get mapname and pause plugin
 
Quote:

Originally Posted by ConnorMcLeod (Post 1777095)
Better to remove that plugin from plugins.ini, and to declare it only in configs/maps/plugins-de.ini

lol, go away...

fysiks 08-20-2012 20:41

Re: Get mapname and pause plugin
 
Quote:

Originally Posted by Alka (Post 1777502)
lol, go away...

So don't offer the best advice? :wink:

Bladell 09-20-2013 16:34

Re: Get mapname and pause plugin
 
Where can I get more informations about this native?
pause("a", "plugin.amxx")
I want to use it but I can't find informations about it on amxmodx.org.

Black Rose 09-20-2013 17:45

Re: Get mapname and pause plugin
 
The inc-files are a great source.
This is from amxmodx.inc
Code:
/* Pauses function or plugin so it won't be executed. * In most cases param1 is name of function and * param2 name of plugin (all depends on flags). * Flags: * "a" - pause whole plugin. * "c" - look outside the plugin (by given plugin name). * "d" - set "stopped" status when pausing whole plugin. *       In this status plugin is unpauseable. * Example: pause("ac","myplugin.amxx") * * Note: There used to be the b and e flags as well, * which have been deprecated and are no longer used. */ native pause(const flag[], const param1[]="",const param2[]="");

Spirit_12 10-15-2017 17:04

Re: Get mapname and pause plugin
 
I'm trying to pause plugin a.amxx from plugin b.amxx. This is what I'm using in plugin "b", but its not working for me. Any ideas?

PHP Code:

pause("a""a.amxx"



All times are GMT -4. The time now is 05:50.

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