Need help with alignment - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Need help with alignment (
/showthread.php?tid=306211)
Need help with alignment -
aybo - 25.12.2011
We have a dialouge after base finishes. it shows how many damage people do. it alignment people by id's. for example;
ID 0 Klawtor 96(DMG)
ID 1 IBaRS 122(DMG)
ID 2 denzel 450(DMG)
ID 3 F0cus 0(DMG)
But it should be like this;
ID 2 denzel 450(DMG)
ID 1 IBaRS 122(DMG)
ID 0 Klawtor 96(DMG)
ID 3 F0cus 0(DMG)
so i need to alignment people by the damages they did
Hope you got it! Thanks
Re: Need help with alignment -
aybo - 25.12.2011
still
Re: Need help with alignment -
fiki574 - 25.12.2011
show code??
Re: Need help with alignment -
aybo - 26.12.2011
Quote:
Originally Posted by fiki574_CRO
show code??
|
For example;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(Player[i][pTeam] == T_ATT)
{
format(iStr, sizeof(iStr), "%s{D3D3D3}[%d]{8B1A1A}%s{D3D3D3}-{8B1A1A}DMG{D3D3D3}:%d{D3D3D3}-{8B1A1A}Kills{D3D3D3}:%d\n",iStr,i,PNames[i],gRoundDamage[i],Player[i][prScore]);
}
if(Player[i][pTeam] == T_DEF)
{
format(iStr, sizeof(iStr), "%s{D3D3D3}[%d]{104E8B}%s{D3D3D3}-{104E8B}DMG{D3D3D3}:%d{D3D3D3}-{104E8B}Kills{D3D3D3}:%d\n",iStr,i,PNames[i],gRoundDamage[i],Player[i][prScore]);
}
}
}