Raised This Month: $ Target: $400
 0% 

Help with client_infochanged


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
siikaisz
Junior Member
Join Date: Aug 2007
Old 01-24-2008 , 20:48   Help with client_infochanged
Reply With Quote #1

so i haveproblem... when player change nick from nonvip name to vip player name, then all works fine, but when player changes Vip name to nonvip name he stays vip extras. Wher can be problem in script?

Main function:

Code:
public client_infochanged(id)
{

    
    hashevip(id)
    if(isvip[id])
    {
        givevip(id)
        console_print(id,"You are VIP")
    }
    else
    {
        takevip(id)
        console_print(id,"You arent VIP")
        
    }
    return PLUGIN_CONTINUE
}
hashevip function:
Code:
public hashevip(id)
{    
        new newname[32]
        ..........
            if( equal(mysql_name, newname)) 
            {
            isvip[id] = true
             }
    .............        
}
givevip function:
Code:
public givevip(id)
{
new armor
    armor = str_to_num("100")
    set_user_armor(id, armor)
}
takevip function:
Code:
public takevip(id)
{
new armor
    armor = str_to_num("0")
    set_user_armor(id, armor)
}
siikaisz is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-24-2008 , 20:51   Re: Help with client_infochanged
Reply With Quote #2

Code:
public hashevip(id) {             new newname[32]         ..........             if( equal(mysql_name, newname))             {             isvip[id] = true             }             else                 isvip[id] = false;     .............         }
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
siikaisz
Junior Member
Join Date: Aug 2007
Old 01-24-2008 , 20:57   Re: Help with client_infochanged
Reply With Quote #3

thnx it helped
siikaisz 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 08:35.


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