Raised This Month: $ Target: $400
 0% 

Argument type mismatch


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-19-2011 , 10:48   Re: Argument type mismatch
Reply With Quote #1

PHP Code:
/*    Formatright © 2011, ConnorMcLeod 

    Admins & VIPs Tags is free software; 
    you can redistribute it and/or modify it under the terms of the 
    GNU General Public License as published by the Free Software Foundation. 

    This program is distributed in the hope that it will be useful, 
    but WITHOUT ANY WARRANTY; without even the implied warranty of 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    GNU General Public License for more details. 

    You should have received a copy of the GNU General Public License 
    along with Admins Tag; if not, write to the 
    Free Software Foundation, Inc., 59 Temple Place - Suite 330, 
    Boston, MA 02111-1307, USA. 
*/ 

#define FLAG_ADMIN_ADMIN        ADMIN_BAN // obligatoirement un flag que les VIPs n'ont pas
#define FLAG_ADMIN_VIP        ADMIN_LEVEL_B

#include <amxmodx> 

#define VERSION "0.0.1" 

#define MAX_NAME_LENGTH    32 

new g_pCvarAdminTagg_pCvarVipTagg_pCvarVipPlaceg_pCvarAdminPlace

public plugin_init() 

    
register_plugin("Admins & VIPs Tags"VERSION"ConnorMcLeod"

    
g_pCvarAdminTag register_cvar("amx_admin_tag""[ADMIN]"
    
g_pCvarVipTag register_cvar("amx_vip_tag""[VIP]")
    
g_pCvarVipPlace register_cvar("amx_vip_tag_potision""0"// 0 left, 1 right
    
g_pCvarAdminPlace register_cvar("amx_admin_tag_potision""0")


public 
client_authorizedid 

    new 
iAdminType get_user_admin(id)
    if( !
iAdminType )
    {
        return
    }
    new 
szName[MAX_NAME_LENGTH
    new 
iNameLen get_user_name(idszNamecharsmax(szName)) 
    
CheckUserName(idszNameiNameLeniAdminType)  


public 
client_infochanged(id

    if( 
is_user_connected(id) ) 
    {
        new 
iAdminType get_user_admin(id)
        if( !
iAdminType )
        {
            return
        }
        new 
szOldName[MAX_NAME_LENGTH],szNewName[MAX_NAME_LENGTH
        
get_user_name(idszOldNamecharsmax(szOldName)) 
        new 
iNameLen get_user_info(id"name"szNewNamecharsmax(szNewName)) 
        if( !
equal(szOldNameszNewName) ) 
        { 
            
CheckUserName(idszNewNameiNameLeniAdminType
        }
    } 


CheckUserName(const idszName[MAX_NAME_LENGTH], const iNameLen, const iAdminType

    new 
szTag[32
    new 
iTagLen get_pcvar_string(iAdminType == FLAG_ADMIN_VIP g_pCvarVipTag g_pCvarAdminTagszTagcharsmax(szTag))

    if( 
containi(szNameszTag) != -
    { 
        return 
    } 

    if( 
get_pcvar_num(iAdminType == FLAG_ADMIN_VIP g_pCvarVipPlace g_pCvarAdminPlace) )
    {
        if( 
MAX_NAME_LENGTH iNameLen iTagLen 
        { 
            
add(szNamecharsmax(szName), szTag
        } 
        else 
        { 
            
formatex(szName[MAX_NAME_LENGTH-iTagLen-1], iTagLenszTag
        }
    }
    else
    {
        
format(szNamecharsmax(szName), "%s %s"szTagszName)
    }

    
set_user_info(id"name"szName


get_user_admin(id

    new 
__flags=get_user_flags(id)
    if( 
__flags>&& !(__flags&ADMIN_USER) )
    {
        if( 
__flags FLAG_ADMIN_ADMIN )
        {
            return 
FLAG_ADMIN_ADMIN
        
}
        else if( 
__flags FLAG_ADMIN_VIP )
        {
            return 
FLAG_ADMIN_VIP
        
}
    }
    return 
0

__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 11:48.


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