Is there a way? - 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: Is there a way? (
/showthread.php?tid=147431)
Is there a way? -
ViruZZzZ_ChiLLL - 12.05.2010
Question : Is there a way to get the
players kill in a row??
Example :
3 kills = 1 wanted level and $1000
Re: Is there a way? -
Killa_ - 12.05.2010
Yes
Re: Is there a way? -
ViruZZzZ_ChiLLL - 12.05.2010
Quote:
Originally Posted by Killa_
Yes
|
lol okay how?? because I'm confused
with these sort of things
Re: Is there a way? -
ettans - 12.05.2010
pawn Код:
public OnPlayerDeath(playerid,killerid)
{
kills[killerid]++;
kills[playerid] = 0;
if(kills[killerid] == 3)
GivePlayerMoney(killerid,1000);
return 1;
}
If a player kills another player, he gets +1 to his kills and the player that died, gets his/her kills set to 0. If the killer has 3 kills, do what you want.
Re: Is there a way? -
iJumbo - 12.05.2010
idk if this work
Код:
new KILLS[MAX_PLAYERS] = 0
public OnPlayerDeath(playerid, killerid, reason)
{
KILLS[killerid] = KILLS[killerid] + 1;
KILLS[playerid] = 0;
if (KILLS[killerid] == 1)
{
//code
return 1;
}
if (KILLS[killerid] == 2)
{
//code
return 1;
}
if (KILLS[killerid] == 3)
{
//code
return 1;
}
if (KILLS[killerid] == 4)
{
//code
return 1;
}
return 1;
}
Re: Is there a way? -
ViruZZzZ_ChiLLL - 12.05.2010
Okay, okay, I'll try these codes
Re: Is there a way? -
Killa_ - 12.05.2010
pawn Код:
new Kills[MAX_PLAYERS];
public OnPlayerDeath(playerid,killerid,reason)
{
if(killerid != INVALID_PLAYER_ID)
{
Kills[killerid]++;
if(playerid != INVALID_PLAYER_ID) Kills[playerid] = 0;
switch(Kills[killerid])
{
case 3: //Stuff here
case 4:
case 5:
//etc
}
}
return 1;
}