How do I do something like these? - 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: How do I do something like these? (
/showthread.php?tid=345964)
How do I do something like these? -
HazardGaming - 26.05.2012
1) Add the box and when someone gets a kill it updates, when they die it reset's to 0.
2) Do that exactly but how would I make it so you can change the score at any time ingame?!
Thanks.
Re: How do I do something like these? -
Kitten - 26.05.2012
pawn Код:
new Kills[MAX_PLAYERS];
public OnPlayerDeath(playerid, killerid, reason)
{
Kills[killerid]++;
Kills[playerid] = 0;
return 1;
}
public OnPlayerUpdate(playerid)
{
new string[128];
format(string,sizeof(string),"Kills: %d",kills[playerid]);
TextDrawSetString(textdrawid,string);
return 1;
}
The boxes are easy to create, using textdraw editor.