AlliedModders

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

alonelive 05-26-2013 12:03

top frags
 
Hello!
PHP Code:

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


new g_maxplayers

public plugin_init()
{
    
register_plugin("test""1.0""tester")
    
register_logevent("logevent_round_end"2"1=Round_End")
    
    
g_maxplayers get_maxplayers()
}


public 
logevent_round_end()
{
    new 
top1[33], top2[33], top3[33]
    
    for(new try = 
0; try < 4; try++) // Check all player 3 time...
    
{
        for(new 
i=0i<=g_maxplayersi++) { 
            if(
is_user_connected(i)) 
            { 
                new 
name[33], tempFrags
                get_user_name
(iname,32)     
                
tempFrags get_user_frags(i)
                if(
top1[i] < tempFrags)
                {
                    
format(top1charsmax(top1),  "%s"name)
                }
                if((
top2[i] < tempFrags) && (tempFrags top1[i]))
                {
                    
format(top2charsmax(top2),  "%s"name)
                }
                if((
top3[i] < tempFrags) && (tempFrags top2[i]))
                {
                    
format(top3charsmax(top3),  "%s"name)
                }
                else
                {
                    break
                }
            }
        }
        
set_hudmessage(02550, -1.0, -1.0)
        
show_hudmessage(0"Best Frager:^n%s^n%s^n%s"top1top2top3)
    }  
    
//Set the top fragger to 0 here again


I have this code, bud he's not works correctly. Can you help me with him?
http://forums.alliedmods.net/showthread.php?t=168284
This script calculate top 3 fraggers of round.


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

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