Raised This Month: $ Target: $400
 0% 

Sql account system Help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
ChriisN
Junior Member
Join Date: Jul 2014
Location: Guatemala city
Old 01-01-2016 , 23:44   Sql account system Help
Reply With Quote #1

Hello I have the Zombie Apocalypse and because everything works well when I register and pick a character , but when i retry and pick a character and I enter bugea and i logea but leaves me spect some help?

Sorry for my bad english.

PHP Code:
loggin_success(idspec 0)
{
    
// Set character name
    
set_user_info(id"name"g_charactername[id][SELECTED_CHARACTER])
    
    
// Welcome message
    
zp_colored_print(0"^x04[ZA]^x01 Bienvenido! ^x04%s^x01 ha iniciado sesión."g_charactername[id][SELECTED_CHARACTER])
    
    
// Update level
    
update_level(id)
    
    
// Set time check task
    
set_task(1.0"check_time"id+TASK_TIME__"b")
    
    
// Set the custom HUD display task if enabled
    
if (get_pcvar_num(cvar_huddisplay))
        
set_task(1.0"ShowHUD"id+TASK_SHOWHUD__"b")
        
    
// Go to spectator?
    
if (spec)
    {
        
// Make a task because name has to be changed, after set account it's logged
        
set_task(0.5"join_team_spec"id)
    }
    else
    {
        
// Make a task because name has to be changed, after set account it's logged
        
set_task(0.5"join_team_t_ct"id)
    }
    
    
// Make a task because admin has to be checked, after name changed
    
set_task(0.5"loggin_success2"id)
}

public 
join_team_spec(id)
{
    
// Not connected
    
if (!g_isconnected[id]) return;
    
    
// Currently logged spectator
    
g_status[id] = ONLINE_SPEC
        
    
// Join SPEC team
    
engclient_cmd(id"jointeam""6")
}

public 
join_team_t_ct(id)
{
    
// Not connected
    
if (!g_isconnected[id]) return;
    
    
// Currently logged
    
g_status[id] = ONLINE
        
    
// Join T or CT team
    
if (fnGetTs() >= fnGetCTs())
        
engclient_cmd(id"jointeam""2")
    else
        
engclient_cmd(id"jointeam""1")
    
    
// Prevent player bugged if he was logged as spectator and
    // went to character menu again
    
if (fm_cs_get_user_team(id) == FM_CS_TEAM_SPECTATOR)
    {
        
remove_task(id+TASK_TEAM)
        
fm_cs_set_user_team(idFM_CS_TEAM_CT// must be CT (he isn't a zombie)
        
fm_user_team_update(id)
    }
}

public 
loggin_success2(id)
{
    
// Not connected
    
if (!g_isconnected[id]) return;
    
    
// Prevent admin log out, loggin and get full modes again
    
if (equal(g_playername[id], g_logoutname[id])) return;
    
    
// Get user flags
    
static userflagsuserflags get_user_flags(id)
    
    
// Admin modes per map
    
for (new ArraySize(g_admin_names)-1> -1i--)
    {
        if (
userflags ArrayGetCell(g_admin_flagsi))
        {
            
g_modescount[id] = ArrayGetCell(g_admin_modesi)
            break;
        }
        else if (
== 0// All flags checked, not admin
            
g_modescount[id] = 0
    
}

ChriisN is offline
 


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 09:28.


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