Kills variable? - 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: Kills variable? (
/showthread.php?tid=144490)
Kills variable? -
-Rebel Son- - 27.04.2010
I'm making a DM server for my clan. and i wanted to know if this would work.
Код:
kills[killerid] +1);
Is that basicly all i do?
and how would i get the kills for a stats bar.
Re: Kills variable? -
MadeMan - 27.04.2010
Re: Kills variable? -
Hiddos - 27.04.2010
pawn Код:
public OnPlayerDeath(playerid,killerid,reason)
{
SetPVarInt(playerid,"Kills",++);
//rest of code
}
Didn't try it though.
Re: Kills variable? -
MadeMan - 27.04.2010
Quote:
Originally Posted by Hiddos
pawn Код:
public OnPlayerDeath(playerid,killerid,reason) { SetPVarInt(playerid,"Kills",++); //rest of code }
Didn't try it though.
|
PVar is good too, but it should be:
pawn Код:
public OnPlayerDeath(playerid,killerid,reason)
{
SetPVarInt(killerid,"Kills",GetPVarInt(killerid,"Kills")+1);
//rest of code
}
Re: Kills variable? -
Mauzen - 27.04.2010
For a status bar look here:
http://forum.sa-mp.com/index.php?topic=138556.0
it works great
Re: Kills variable? -
-Rebel Son- - 27.04.2010
Oh, i got a stats bar, ( textdraw ) and i just need how to get the players kills, to list them there. Like killerid kills a guy,
on the stats bar: Kills 1 ect.