SetPlayerScore help .
#1

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid != INVALID_PLAYER_ID)
    {
       GivePlayerMoney(killerid, random(5000));
    }
    GivePlayerMoney(playerid, -400);
    SetPlayerScore(playerid, GetPlayerScore(playerid) + 1);
    SendDeathMessage(killerid, playerid, reason);
    return 1;
}




Why deceased received Score ?
Reply
#2

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid != INVALID_PLAYER_ID)
    {
       GivePlayerMoney(killerid, random(5000));
    }
    GivePlayerMoney(playerid, -400);
    SetPlayerScore(killerid, GetPlayerScore(killerid) + 1); // It's 'killerid' not 'playerid'
    SendDeathMessage(killerid, playerid, reason);
    return 1;
}
Reply
#3

Quote:
Originally Posted by J4Rr3x
Посмотреть сообщение
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid != INVALID_PLAYER_ID)
    {
       GivePlayerMoney(killerid, random(5000));
    }
    GivePlayerMoney(playerid, -400);
    SetPlayerScore(killerid, GetPlayerScore(killerid) + 1); // It's 'killerid' not 'playerid'
    SendDeathMessage(killerid, playerid, reason);
    return 1;
}
Oh . Thank You .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)