double kills in death box - 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: double kills in death box (
/showthread.php?tid=486882)
double kills in death box -
Swisher - 11.01.2014
No matter if i /kill myself or someone else kills , the death shows up twice in deathbox for all players ...
here is my code
edit: and i am vip 2 and still lose money on death..
Quote:
public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid, playerid, reason);
GivePlayerMoney(playerid, 100);
if(PlayerInfo[playerid][pVip] < 1) GivePlayerMoney(playerid, -250); // Loses $250 if he is less then level 1 Vip, if he is more or equal to level 1, he does not lose money.
PlayerInfo[playerid][pDeaths]++;
if(killerid != INVALID_PLAYER_ID)
{
if(PlayerInfo[killerid][pVip] >= 2) GivePlayerMoney(killerid, 1000); // Gets $1000 if he is 2+ level Vip.
else GivePlayerMoney(killerid, 500); // Gets $500 if he is less than Vip level 2.
SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
PlayerInfo[killerid][pKills]++;
if(IsPlayerNPC(playerid)) return 1;
}
return 1;
}
|
Re: double kills in death box -
AIped - 11.01.2014
Make sure you dont have another filterscript running with OnPlayerDeath and SendDeathMessage(killerid, playerid, reason);
Re: double kills in death box -
Swisher - 11.01.2014
Thanks for the help! +rep
Re: double kills in death box -
AIped - 12.01.2014
no problem man..btw i didnt get your rep
Re: double kills in death box -
boomerboom - 12.01.2014
Quote:
Originally Posted by AIped
no problem man..btw i didnt get your rep 
|
Then you get my rep.