AlliedModders

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

killergirl 03-12-2011 14:56

Condition
 
I want to make a plug with you can check something if you have X death / kills ratio, but I don't know how can I check the players ratio.

Here is:

PHP Code:

    new iStats[8], ibStats[8]
    
    
get_user_stats(idiStatsibStats)
    
    new 
Float:result
    
    result 
= (50.0 float(iStats[STATS_KILLS]) / float(iStats[STATS_KILLS] + iStats[STATS_DEATHS]))
    
    if(
result(id) == 50.0)
    {
        
// do stuff
    


I need to define the condition? Or... I really don't know.


All times are GMT -4. The time now is 14:38.

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