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

Get mapname and pause plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dasha
Senior Member
Join Date: Apr 2012
Location: \%STEAM -> $_SESSION
Old 08-20-2012 , 07:07   Get mapname and pause plugin
Reply With Quote #1

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?
dasha is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 08-20-2012 , 07:11   Re: Get mapname and pause plugin
Reply With Quote #2

Code:
if(containi(map, "de_") == -1) {
    //map name doesn't contain de_
}
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
dasha
Senior Member
Join Date: Apr 2012
Location: \%STEAM -> $_SESSION
Old 08-20-2012 , 07:21   Re: Get mapname and pause plugin [solved]
Reply With Quote #3

Quote:
Originally Posted by Alka View Post
Code:
if(containi(map, "de_") == -1) {
    //map name doesn't contain de_
}
Thankyou!
dasha is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-20-2012 , 12:21   Re: Get mapname and pause plugin
Reply With Quote #4

Better to remove that plugin from plugins.ini, and to declare it only in configs/maps/plugins-de.ini
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
dasha
Senior Member
Join Date: Apr 2012
Location: \%STEAM -> $_SESSION
Old 08-20-2012 , 17:20   Re: Get mapname and pause plugin
Reply With Quote #5

Quote:
Originally Posted by ConnorMcLeod View Post
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.
The de_ is just an example, it be going with another prefix.

Anyway, thanks!
dasha is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 08-20-2012 , 20:10   Re: Get mapname and pause plugin
Reply With Quote #6

Quote:
Originally Posted by ConnorMcLeod View Post
Better to remove that plugin from plugins.ini, and to declare it only in configs/maps/plugins-de.ini
lol, go away...
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-20-2012 , 20:41   Re: Get mapname and pause plugin
Reply With Quote #7

Quote:
Originally Posted by Alka View Post
lol, go away...
So don't offer the best advice?
__________________

Last edited by Alka; 08-21-2012 at 03:58. Reason: Hello fysiks! xD i was trolling; --Alka
fysiks is offline
Bladell
Senior Member
Join Date: Jun 2012
Old 09-20-2013 , 16:34   Re: Get mapname and pause plugin
Reply With Quote #8

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.
Bladell is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 09-20-2013 , 17:45   Re: Get mapname and pause plugin
Reply With Quote #9

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[]="");
__________________
Black Rose is offline
Spirit_12
Veteran Member
Join Date: Dec 2012
Location: Toronto, CA
Old 10-15-2017 , 17:04   Re: Get mapname and pause plugin
Reply With Quote #10

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"
__________________
Spirit_12 is offline
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 10:23.


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