Raised This Month: $ Target: $400
 0% 

Maps in file


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
extreem
Member
Join Date: Apr 2011
Location: Czech Republick
Old 12-23-2011 , 01:45   Maps in file
Reply With Quote #1

Help me please, I want create plugin which will send message in chat on samothing maps.
Here is code, I think you will understand what I want.
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plugin"
#define VERSION "1.0"
#define AUTHOR "Extreem"
#define MAX_MAPS 150

new lines[MAX_MAPS][20]
new 
mapsNam


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /test""testFunc")
}
public 
testFunc() {
    new 
mapsfile[128]
    
get_localinfo("amxx_configsdir"mapsfilecharsmax(mapsfile))
    
add(mapsfilecharsmax(mapsfile), "/allmaps.ini")
    
    new 
leni=0
    
while( MAX_MAPS && read_file(mapsfileilines[mapsNam], 19len))
    {
        
i++
        if( 
lines[mapsNam][0] == ';' || len == 0)
            continue
        
mapsNam++
    }

    new 
nameMap[30]
    
get_mapname(nameMapcharsmax(nameMap))
    if(
equal(nameMaplines[i++])){
        
client_print(0print_chat"Map name is aim_awp")
    }
    else{
        
client_print(0print_chat"Map name is NOT aim_awp")
    }

In file allmapsa.ini I wanna write maps aim_awp and awp_india. But on aim_awp server print Map name is NOT aim_awp
__________________
extreem is offline
Send a message via Skype™ to extreem
 



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 11:55.


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