Raised This Month: $7 Target: $400
 1% 

get_user_info() in if/elseif


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HLM
Senior Member
Join Date: Apr 2008
Location: C:\WINDOWS\System32
Old 03-03-2016 , 16:30   get_user_info() in if/elseif
Reply With Quote #1

Hello, I have been working on a small plugin that will automatically set up the setinfo line for my server admins who want to use the entmod metamod plugin since it is locked to each individuals SteamID, we have always just went to using the same password so nobody has to 'remember' their password or have it saved in plaintext.

I have added to codeblocks into my hook_say, they are as follows.. the problem is the first get_user_info works, but the 2nd codeblock errors on the second get_user_info stating that there is a native error (10) on get_user_info

For testing purposes, I decided to just copy the entire first codeblock (the 2nd is EXTREMELY similar, however it checks to see if the correct password 'ent' is in the field, and if not it will set it.)

PHP Code:
if(equali(szSaid"!info "6))
        {
            new 
target[32];
            
copy(targetcharsmax(target), szSaid[6])
            
//client_print(id, print_chat, "%s", target);
            
new t_id cmd_target(idtargetCMDTARGET_NO_BOTS);
            new 
t_name[33], t_authid[33], t_ip[33], t_sid[33];
            
get_user_name(t_idt_namecharsmax(t_name));
            
get_user_authid(t_idt_authidcharsmax(t_authid));
            
get_user_info(t_id"_ent"t_sid32);
            
client_print(idprint_chat"%s - %s [%s]"t_namet_authidt_sid);
        }
        if(
equali(szSaid"!rinfo "7))
        {
            new 
target[32];
            
copy(targetcharsmax(target), szSaid[6])
            
//client_print(id, print_chat, "%s", target);
            
new t_id cmd_target(idtargetCMDTARGET_NO_BOTS);
            new 
t_name[33], t_authid[33], t_sid[33];
            
get_user_name(t_idt_namecharsmax(t_name));
            
get_user_authid(t_idt_authidcharsmax(t_authid));
            
get_user_info(t_id"_ent"t_sid32);
            
client_print(idprint_chat"%s - %s [%s]"t_namet_authidt_sid);
            
        } 
Any help with this problem would be greatly appreciated.
__________________
+|- KARMA Respectively

HLM is offline
Reply


Thread Tools
Display Modes

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 22:35.


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