AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Add time to dmg! (https://forums.alliedmods.net/showthread.php?t=120985)

flamin 03-10-2010 09:47

Add time to dmg!
 
1 Attachment(s)
Hi i want to make a time to dmg so that it can run on a new round and able to see the dmg of the last round, here the sma with code -- i think doing a bool could achieve via set_task but not be create help... :)

Zombiezzz 03-10-2010 10:15

Re: Add time to dmg!
 
"Get Plugin" is the amxx so you dont need to post another amxx file. Get rid of it.

flamin 03-10-2010 11:06

Re: Add time to dmg!
 
Hi apologized for what the amxx plugin but could help make the code?

Arkshine 03-10-2010 11:17

Re: Add time to dmg!
 
You are not allowed to attach .amxx, you should remove it.

flamin 03-10-2010 11:49

Re: Add time to dmg!
 
Ok ready already eliminated the amxx plugin help me with code? I have almost programd the code what post...

PHP Code:

register_logevent("logevent_round_end"2"1=Round_End"// get when round ends 

PHP Code:

new boolallowdmg false

public allowdmgreset()
{
    
allowdmg false
}

public 
logevent_round_end()
{
            
allowdmg true
            set_task
(20.0,"allowdmgreset")


PHP Code:

public cmd_dmg(id)
{
    if(
is_user_alive(id) && id != && allowdmg == false pug_msg_tmp_empty(id,"PUG_CMD_NOTALLOWED");
    else
    {
        static 
Players[32], name[32]
        new 
playerCountiplayer
        get_players
(PlayersplayerCount"ch")

        new 
tmp_hitstmp_dmgtmp_rhitstmp_rdmgcheck
        
for (i=0i<playerCounti++)
        {
            
player Players[i]
            
tmp_hits pug_hits[id][player]
            
tmp_rhits pug_hits[player][id]

            if( 
tmp_hits || tmp_rhits )
            {
                
check 1
                tmp_dmg 
pug_dmg[id][player]
                
tmp_rdmg pug_dmg[player][id]

                if(
player == idclient_print(id,print_chat,"%s %L",pug_header,id,"PUG_AUX_DMG_SELF",tmp_dmg,tmp_hits)
                else
                {
                    
get_user_name(player,name31)
                    
client_print(id,print_chat,"%s %L",pug_header,id,"PUG_AUX_DMG",tmp_dmg,tmp_hits,tmp_rdmg,tmp_rhitsname)
                }
            }
          }

        
tmp_hits pug_hits[id][0]
        
tmp_rhits pug_hits[0][id]
        if( 
tmp_hits || tmp_rhits )
        {
            
tmp_dmg pug_dmg[id][0]
            
tmp_rdmg pug_dmg[0][id]
            
client_print(id,print_chat,"%s %L",pug_header,id,"PUG_AUX_DMG","WorldSpawn",tmp_hits,tmp_dmg,tmp_rdmg,tmp_rhitsname)
        }
        else if(!
checkclient_print(id,print_chat,"%s %L",pug_header,id,"PUG_AUX_NODMG")
    }
    return 
PLUGIN_HANDLED


I have already done the bool but when I run the command in the new round not shows me the dmg of the previous round now nose if this something bad in the set_task or le missing something to the code please help!!


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

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