double kills in death box
#1

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;
}

Reply
#2

Make sure you dont have another filterscript running with OnPlayerDeath and SendDeathMessage(killerid, playerid, reason);
Reply
#3

Thanks for the help! +rep
Reply
#4

no problem man..btw i didnt get your rep
Reply
#5

Quote:
Originally Posted by AIped
Посмотреть сообщение
no problem man..btw i didnt get your rep

Then you get my rep.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)