07.10.2016, 14:16
How can i split the scores into police scores and criminal scores?I'm using cScore and rScore in the playerinfo enum
public OnPlayerDeath( playerid, killerid, reason ) { if( playerid != INVALID_PLAYER_ID && killerid != INVALID_PLAYER_ID ) { if( GetPlayerWantedLevel( playerid ) > 0 ) // They are a wanted player { PlayerData[ killerid ][ cScore ]++; // Replace the PlayerData with whatever your enum is /* Update Player Total Score ( Maybe this is what you meant ? ) */ SetPlayerScore( playerid, PlayerData[ killerid ][ cScore ] + PlayerData[ killerid ][ rScore ] ); // Not sure if you wanted to add the points together to form the total score? } } return 1; }
You want to add something like this:
Код:
public OnPlayerDeath( playerid, killerid, reason ) { if( playerid != INVALID_PLAYER_ID && killerid != INVALID_PLAYER_ID ) { if( GetPlayerWantedLevel( playerid ) > 0 ) // They are a wanted player { PlayerData[ killerid ][ cScore ]++; // Replace the PlayerData with whatever your enum is /* Update Player Total Score ( Maybe this is what you meant ? ) */ SetPlayerScore( playerid, PlayerData[ killerid ][ cScore ] + PlayerData[ killerid ][ rScore ] ); // Not sure if you wanted to add the points together to form the total score? } } return 1; } |