SA-MP Forums Archive
My score did not increase with killing players - 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: My score did not increase with killing players (/showthread.php?tid=367174)



My score did not increase with killing players - Healian - 09.08.2012

I am creating a gamemode but i am facing a shit problem i kill my friend's player in the game but my score did not increase


Re: My score did not increase with killing players - damiantof71 - 09.08.2012

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    // Add 1 to this killer's score.
    if(killerid != INVALID_PLAYER_ID) SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
    return 1;
}



Re: My score did not increase with killing players - Healian - 09.08.2012

ok its working now but LuxAdmin is supposed to load the saved data on player connect but when i logoff and log on again i find my score reset !


Re: My score did not increase with killing players - damiantof71 - 09.08.2012

Add this line in the admin script:

Код:
#define SAVE_SCORE true



Re: My score did not increase with killing players - Eminem 2ka9 - 09.08.2012

Here

pawn Код:
public OnPlayerDeath( playerid, killerid, reason )
{
    SendDeathMessage( killerid, playerid, reason );
    SetPlayerScore( killerid,GetPlayerScore(killerid)+2);
    for(new i=0; i<19; i++) TextDrawHideForPlayer(playerid,HealthBar[i]);
    GivePlayerMoney(killerid, 3500);
    new szName[ MAX_PLAYER_NAME ], szStr[ 60 ];
    GetPlayerName( playerid, szName, sizeof( szName ) );
    format( szStr, sizeof( szStr ), "You got +2 score and $3500 for killing %s", szName ); // change this message to your own
    SendClientMessage( killerid, COLOR_BLUE, szStr );
    SendClientMessage(playerid, COLOR_BRIGHTRED, "You just got killed!");