Raised This Month: $ Target: $400
 0% 

Need Help With a Script


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
deadman909
Veteran Member
Join Date: Oct 2008
Old 08-18-2009 , 03:32   Need Help With a Script
Reply With Quote #1

Error

PHP Code:
    register_concmd("amx_clanvsall","allvsclan",ADMIN_MENU," Clan Vs. Everyone Else <Clan Tag> <Clan Team: CT or T> ")
    
register_concmd("amx_unclanvsall","allvsall",ADMIN_MENU," Allows People To Join Other Teams Again. ")

    
register_forward(FM_PlayerPreThink,"FM_PreThink")

    
MAXPLAYERS get_maxplayers()
    
    
SVC_SCREENFADE get_user_msgid"ScreenFade" )
    
SVC_SCREENSHAKE get_user_msgid"ScreenShake" )
    
WTF_DAMAGE get_user_msgid"Damage" )

    
g_MsgSync CreateHudSyncObj()

#if defined DAMAGE_RECIEVED
    
g_MsgSync2 CreateHudSyncObj()
#endif

    
new config_dir[80]
    
get_configsdir(config_dir,79)
    
format(file_name,127,"%s/%s",config_dir,CONFIG_FILE// store path/file in global 'file_name'
    
    
new text[256],name[33],steamid[33],txtLen,line_num=0
    
// parse config file if exists
    
if (file_exists(file_name)){
        
line_num=read_file(file_name,line_num,text,255,txtLen// read first line
        
while(line_num){
            
parse(text,steamid,32,name,32)
            if (
line_num<=MAX_USERS){ // stop caching if MAX_USERS reached
                
if (strlen(steamid) && strlen(name)){
                    
// cache (SteamID -> PlayerName) pairs
                    
format(steam_names[line_num-1][0],34,"%s",steamid)
                    
format(steam_names[line_num-1][1],34,"%s",name)
                    
num_users=line_num // update number of listed users
                
}
                
line_num=read_file(file_name,line_num,text,255,txtLen// read next line
            
}else line_num=// MAX_USERS reached stop parsing
        
}
    }
}

public 
allvsclan(id,level,cid)
{
    if(!
cmd_access(id,level,cid,3))
    {
        return 
PLUGIN_HANDLED
    
}

    new 
arg1[32]
    new 
arg2[32]
    
read_argv(1,arg1,31)
    
read_argv(2,arg2,31)

    if(
equali(arg2,"CT")) CT=true           //This are the 2 LINES where i get the Errors
    
else if(equali(arg2,"T")) CT=false      //This are the 2 LINES where i get the Errors
    
else
    {
        
console_print(id,"Invalid Team")
        return 
PLUGIN_HANDLED
    
}

    
format(tag,31,"%s",arg1
__________________


Last edited by deadman909; 08-19-2009 at 09:58.
deadman909 is offline
Send a message via MSN to deadman909 Send a message via Yahoo to deadman909
 



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 15:14.


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