AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   how to add 2 things (https://forums.alliedmods.net/showthread.php?t=193246)

SPT1 08-17-2012 18:02

how to add 2 things
 
like i mean
PHP Code:

public client_disconnect(id
{
    if (!
is_user_bot(id))
    {
        
InsertInfo(id);
    } 

so how will i add this?
PHP Code:

public client_disconnect(id){
    new 
name[32]
    
    
get_user_name(id,name,31)   
    
replace_all(name,32,"'","")
    
replace_all(name,32,"^"","")
    
    PlayedTime[id] = get_playedtime(id)
    
    formatex(g_query,511,"
UPDATE played_time SET playedtime='%d' WHERE name='%s'",PlayedTime[id],name)
    SQL_ThreadQuery(sql,"
query",g_query)
    
    PlayedTime[id] = 0



matsi 08-17-2012 18:07

Re: how to add 2 things
 
Don't really get what you're asking... :shock:

SPT1 08-17-2012 18:33

Re: how to add 2 things
 
PHP Code:

public client_disconnect(id)  

    if (!
is_user_bot(id)) 
    { 
        
InsertInfo(id); 
    }  
 new 
name[32
     
    
get_user_name(id,name,31)    
    
replace_all(name,32,"'",""
    
replace_all(name,32,"^"","") 
     
    PlayedTime[id] = get_playedtime(id) 
     
    formatex(g_query,511,"
UPDATE played_time SET playedtime='%d' WHERE name='%s'",PlayedTime[id],name) 
    SQL_ThreadQuery(sql,"
query",g_query) 
     
    PlayedTime[id] = 0 


if i do this will it work?

fysiks 08-17-2012 18:54

Re: how to add 2 things
 
What exactly are you trying to do?


All times are GMT -4. The time now is 05:45.

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