AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   frags (https://forums.alliedmods.net/showthread.php?t=13923)

lai 06-03-2005 03:38

frags
 
Code:

new csdata=get_user_frags(id)

    result = dbi_query(dbc,"SELECT * FROM Entertainment WHERE csname = '%s'",csname)
    if (dbi_num_rows(result) < 1) {
        new newname[32]
        get_user_name(id,newname,31)
        if ( equal(newname,"csname") ){
        return PLUGIN_HANDLED
        }
       
        result = dbi_query(dbc,"INSERT INTO Entertainment (csname,steamid,csip,csid,csdata,num) values ('%s','%s','%s','%d','%d',1)",csname,steamid,csip,csid,csdata)
        dbi_free_result(result)
    }else{
       
        result = dbi_query(dbc,"UPDATE Entertainment SET num=num+1, csdata='%d' WHERE csname = '%s'",csdata,csname)
        dbi_free_result(result)
    }
    dbi_free_result(result)
    return PLUGIN_HANDLED


Why csdata=get_user_frags (id) writed in MYSQL csdata=0? ? ? ? ? ?


All times are GMT -4. The time now is 16:43.

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