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

Rewrite please


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Artifact
Veteran Member
Join Date: Jul 2010
Old 01-23-2015 , 13:04   Rewrite please
Reply With Quote #1

Because I'm not in this long time, I know this is not best way to get my idea. Can just someone to rewrite my.. i dont know what is this, something like code
PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
new trenutnaMapa[32]
public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
set_task(5.0"chackMap")
}


public 
chackMap() {
    
get_mapname(trenutnaMapa31)
    if(
containi(trenutnaMapa"de_") !=1) {
        
server_cmd("mp_freezetime 3")
        return 
PLUGIN_HANDLED
    
}
    else if(
containi(trenutnaMapa"cs_")!=1) {
        
server_cmd("mp_freezetime 3")
        return 
PLUGIN_HANDLED
    
}
    else if(
containi(trenutnaMapa"as_")!=1) {
        
server_cmd("mp_freezetime 3")
        return 
PLUGIN_HANDLED
    
}
    else {
        
server_cmd("mp_freezetime 0")
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_HANDLED

__________________
Artifact is offline
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 01-23-2015 , 14:57   Re: Rewrite please
Reply With Quote #2

Maybe...
PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR);
    
set_task(5.0"chackMap");
}


public 
chackMap() {
    new const 
mapPrefix[][] = {"de_""cs_""as_"};
    new const 
mapFreeze[] = {330};
    
    new 
mapName[32];
    
get_mapname(mapNamecharsmax(mapName));
    
    for (new 
i=0sizeof mapPrefixi++){
        if (
containi(mapNamemapPrefix[i]) != 1){
            
set_cvar_num("mp_freezetime",mapFreeze[i]);
            break;
        }
    }

__________________

Last edited by Neeeeeeeeeel.-; 01-23-2015 at 14:59.
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
wickedd
Veteran Member
Join Date: Nov 2009
Old 01-23-2015 , 16:12   Re: Rewrite please
Reply With Quote #3

You don't need a plugin for that, just read this.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd 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 19:06.


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