AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   can someone help me with this please! (https://forums.alliedmods.net/showthread.php?t=220080)

maximus.toby 07-06-2013 18:37

can someone help me with this please!
 
i have a jailbreak rank system but now it remove -1 points if someone dies, but on jailbreak Ts many die is there some who knows i can change it so they don't lose points!
and they start with 0 points instat of with 1000 xD already thx to help me xD

Code:

UTIL_Save( id )
{
        new szAuthid[ 34 ], szName[ 64 ]
       
        get_user_name( id, szName, charsmax( szName ) )
        get_user_authid( id, szAuthid, charsmax( szAuthid ) )
       
        UTIL_SQL_EscapeString( szName )
       
        new iPoints = g_iKillsSession[ id ] - g_iDeathsSession[ id ]
       
        formatex( g_szSqlCache, charsmax( g_szSqlCache ),
                        "INSERT INTO jb_top15 VALUES ('%s', '%s', %d, %d, 1000+%d ) ON DUPLICATE KEY UPDATE kills=kills+%d, deaths=deaths+%d, points=points+%d",
                        szAuthid, szName, g_iKillsSession[ id ], g_iDeathsSession[ id ], iPoints, g_iKillsSession[ id ], g_iDeathsSession[ id ], iPoints, szAuthid
                )
               
        SQL_ThreadQuery( g_iSqlHandle, "_hSaveQuery", g_szSqlCache )
       
        g_iKillsSession[ id ] = 0
        g_iDeathsSession[ id ] = 0
}



All times are GMT -4. The time now is 06:32.

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