Posts: 22
Threads: 1
Joined: May 2018
Quote:
Originally Posted by Hadzaga
PHP Code:
public OnPlayerDeath(playerid, killerid, reason)
{
SetPlayerArmour(playerid, 0);
if(killerid != INVALID_PLAYER_ID)
{
new level;
SendDeathMessage(killerid, playerid, reason);
PlayerInfo[killerid][pKills] ++;
PlayerInfo[playerid][pDeaths] ++;
trenutnokills[killerid] ++;
trenutnodeaths[playerid] ++;
level = SetPlayerScore(killerid,(GetPlayerScore(killerid))+1);
PlayerInfo[killerid][pLevel] = level;
SetPlayerScore(playerid,PlayerInfo[playerid][pLevel]);
When i kill someone it puts me +1 score but it resets score of playerid(guy i killed).How can i save that score and when i join server i need to have that score,and dont reset PLAYERID score
|
Remove this line its not needed, since you didn't even trouble the person who died score at all.
PHP Code:
SetPlayerScore(playerid,PlayerInfo[playerid][pLevel]);