[Really Need Help With This]Textdraw Team Kill Counter - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Really Need Help With This]Textdraw Team Kill Counter (
/showthread.php?tid=110290)
[Really Need Help With This]Textdraw Team Kill Counter -
Tigerbeast11 - 25.11.2009
Hi!
I making this for a friend. How can i make a textdraw with a team kill counter?
I have done this:
What would i put under OnPlayerDeath?
The result should be at the bottom-left cornor saying:
Groves have: 10 kills
Ballas have: 12 kills
Re: [Really Need Help With This]Textdraw Team Kill Counter -
Tigerbeast11 - 25.11.2009
Thnx so much dude!
Re: [Really Need Help With This]Textdraw Team Kill Counter -
Joe Staff - 25.11.2009
Seems a bit unnecessary to me. You're using a timer where one isn't needed.
pawn Код:
new GroveScore,BallasScore;
public OnGameModeInit()
{
TextDrawStuffz...
}
public OnPlayerDeath(playerid,killerid,reason)
{
if(gTeam[playerid]==grove)
{
if(gTeam[playerid]==grove)GroveScore--; //otherwise punishment
else BallasScore++;
}else{
if(gTeam[playerid]==ballas)BallasScore--; //otherwise punishment
else GroveScore++;
}
new tmpstr[50]; //Accommodate for string size
format(tmpstr,sizeof(tmpstr),"Grove: %d Ballas:%d",GroveScore,BallasScore);
TextDrawSetString(YourTextDraw,tmpstr);
return 1;
}
Simpler and doesn't require timers
Re: [Really Need Help With This]Textdraw Team Kill Counter -
Tigerbeast11 - 26.11.2009
Thn x both u guys! It really helped my friend!