Kills variable?
#1

I'm making a DM server for my clan. and i wanted to know if this would work.


Код:
new kills;
Код:
kills[killerid] +1);
Is that basicly all i do?

and how would i get the kills for a stats bar.
Reply
#2

pawn Код:
new kills[MAX_PLAYERS];
pawn Код:
kills[killerid]++;
Reply
#3

pawn Код:
public OnPlayerDeath(playerid,killerid,reason)
{
   SetPVarInt(playerid,"Kills",++);
   //rest of code
}
Didn't try it though.
Reply
#4

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
}
Reply
#5

For a status bar look here: http://forum.sa-mp.com/index.php?topic=138556.0
it works great
Reply
#6

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)