AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   dmg done and dmg recieved (https://forums.alliedmods.net/showthread.php?t=117855)

liryck 02-05-2010 10:52

dmg done and dmg recieved
 
hy there this is a part of yap plugins about pugs.

what im trying is to show the dmg done and dmg recieved in this form

PHP Code:

--> (0 dmg 0 hitsto (0 dmg 0 hitsfrom EMAZING^ (100 hp)
--> (
0 dmg 0 hitsto (100 dmg 1 hitsfrom theSLAM (16 hp)
--> (
0 dmg 0 hitsto (100 dmg 2 hitsfrom A2TheK (4 hp

but i got this in my server

PHP Code:

[FAVE] (0 dmg 0 hitsto (108 dmg 1 hitsfrom TwiST3D-
[
FAVE] (0 dmg 0 hitsto (108 dmg 0 hitsfrom iTalox_x :x
[FAVE] (0 dmg 0 hitsto (108 dmg 0 hitsfrom -[El Davila]-SereOnoSere??
[
FAVE] (0 dmg 0 hitsto (108 dmg 0 hitsfrom GULAG
[FAVE] (0 dmg 0 hitsto (108 dmg 0 hitsfrom Menfis
[FAVE] (0 dmg 0 hitsto (108 dmg 0 hitsfrom $h0xcz!
[
FAVE] (30 dmg 1 hitsto (87 dmg 1 hitsfrom danielp_
[FAVE] (30 dmg 0 hitsto (87 dmg 0 hitsfrom Neydrus
[FAVE] (5 dmg 1 hitsto (87 dmg 0 hitsfrom 

has u can see the dmg repeat if the first player hit the rest players will have the same dmg at least other player hit the same target too

this is the code, im not so good at scripting so i know that here are many good scripting. plz some help

also i want the the dmg done show it latter of the respawn for some segs like i dont know 10 segs or 5 segs but have no idea =/

PHP Code:

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

        new 
tmp_hitstmp_dmgcheck
        
        
static RPlayers[32], rname[32]
        new 
rplayerCountjrplayer
        get_players
(RPlayersrplayerCount"ch")
        new 
rtmp_hitsrtmp_dmg,rcheck
        
        
        
for (i=0i<playerCounti++)
        {
            
player Players[i]
            
tmp_hits pug_hits[id][player]

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

            }
            for (
j=0j<rplayerCountj++)
                 {
                
rplayer RPlayers[i]
                
rtmp_hits pug_hits[rplayer][id]
    
                if( 
rtmp_hits )
                {
                    
rcheck 1
                    rtmp_dmg 
pug_dmg[rplayer][id]

                    
                }
            }
            if(
player == id && rplayer == idclient_print(id,print_chat,"%s %L",pug_header,id,"PUG_AUX_DMG_SELF",tmp_hits,tmp_dmg)
                else
                {
                    
get_user_name(player,name31)
                    
client_print(id,print_chat,"%s %L",pug_header,id,"PUG_AUX_DMG",tmp_dmg,tmp_hits,rtmp_dmg,rtmp_hits,name)
                }
                
          }
        

        
tmp_hits pug_hits[id][0]
        if(
tmp_hits)
        {
            
tmp_dmg pug_dmg[id][0]
            
client_print(id,print_chat,"%s %L",pug_header,id,"PUG_AUX_DMG","WorldSpawn",tmp_hits,tmp_dmg)
        }
        else if(!
checkclient_print(id,print_chat,"%s %L",pug_header,id,"PUG_AUX_NODMG")
        
        
rtmp_hits pug_hits[0][id]
        if(
rtmp_hits)
        {
            
rtmp_dmg pug_dmg[0][id]
            
client_print(id,print_chat,"%s %L",pug_header,id,"PUG_AUX_RDMG","WorldSpawn",rtmp_hits,rtmp_dmg)
        }
        else if(!
rcheckclient_print(id,print_chat,"%s %L",pug_header,id,"PUG_AUX_RNODMG")
    
    } 


liryck 02-07-2010 09:48

Re: dmg done and dmg recieved
 
any one help?


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

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