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 hits) to (0 dmg / 0 hits) from EMAZING^ (100 hp)
--> (0 dmg / 0 hits) to (100 dmg / 1 hits) from theSLAM (16 hp)
--> (0 dmg / 0 hits) to (100 dmg / 2 hits) from A2TheK (4 hp)
but i got this in my server
PHP Code:
[FAVE] (0 dmg / 0 hits) to (108 dmg / 1 hits) from TwiST3D-
[FAVE] (0 dmg / 0 hits) to (108 dmg / 0 hits) from iTalox_x :x
[FAVE] (0 dmg / 0 hits) to (108 dmg / 0 hits) from -[El Davila]-SereOnoSere??
[FAVE] (0 dmg / 0 hits) to (108 dmg / 0 hits) from GULAG
[FAVE] (0 dmg / 0 hits) to (108 dmg / 0 hits) from Menfis
[FAVE] (0 dmg / 0 hits) to (108 dmg / 0 hits) from $h0xcz!
[FAVE] (30 dmg / 1 hits) to (87 dmg / 1 hits) from danielp_
[FAVE] (30 dmg / 0 hits) to (87 dmg / 0 hits) from Neydrus
[FAVE] (5 dmg / 1 hits) to (87 dmg / 0 hits) from ~
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 != 0) pug_msg_tmp_empty(id,"PUG_CMD_NOTALLOWED");
else
{
static Players[32], name[32]
new playerCount, i, player
get_players(Players, playerCount, "ch")
new tmp_hits, tmp_dmg, check
static RPlayers[32], rname[32]
new rplayerCount, j, rplayer
get_players(RPlayers, rplayerCount, "ch")
new rtmp_hits, rtmp_dmg,rcheck
for (i=0; i<playerCount; i++)
{
player = Players[i]
tmp_hits = pug_hits[id][player]
if( tmp_hits )
{
check = 1
tmp_dmg = pug_dmg[id][player]
}
for (j=0; j<rplayerCount; j++)
{
rplayer = RPlayers[i]
rtmp_hits = pug_hits[rplayer][id]
if( rtmp_hits )
{
rcheck = 1
rtmp_dmg = pug_dmg[rplayer][id]
}
}
if(player == id && rplayer == id) client_print(id,print_chat,"%s %L",pug_header,id,"PUG_AUX_DMG_SELF",tmp_hits,tmp_dmg)
else
{
get_user_name(player,name, 31)
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(!check) client_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(!rcheck) client_print(id,print_chat,"%s %L",pug_header,id,"PUG_AUX_RNODMG")
}