Splitting the scores into two parts -
StrikerZ - 07.10.2016
How can i split the scores into police scores and criminal scores?I'm using cScore and rScore in the playerinfo enum
Re: Splitting the scores into two parts -
Eoussama - 07.10.2016
Quote:
Originally Posted by Sunehildeep
How can i split the scores into police scores and criminal scores?I'm using cScore and rScore in the playerinfo enum
|
just save them into separate names on .ini file
Re: Splitting the scores into two parts -
StrikerZ - 07.10.2016
Bro. I mean like, see suppose a player killed a wanted criminal so we will get police scores, but to give them scores what line should be used
Re: Splitting the scores into two parts -
gurmani11 - 07.10.2016
https://sampwiki.blast.hk/wiki/SetPlayerScore
Re: Splitting the scores into two parts -
StrikerZ - 07.10.2016
-__- . Bro lol im not talking about this. HOW can i make the GetPlayerScore line for cScore and rScore?
Re: Splitting the scores into two parts -
StrikerZ - 07.10.2016
btw i don't have idea on how to use GetPlayerTargetActor.. How can it be used for aiming at it and pressing Y to pop up a dialog [Pressing y=onplayerkeystatechange but GetPlayerTargetActor and its usage

i checked wiki too but still can't understand it]
Re: Splitting the scores into two parts -
SyS - 07.10.2016
make two vars to hold them increment one of them according to the need thats it.Same vars can be used to save in the database.
Re: Splitting the scores into two parts -
Luicy. - 07.10.2016
I think you're looking for
SetPlayerWantedLevel(playerid, /*The score*/);
based on your replies.
Re: Splitting the scores into two parts -
azzerking - 07.10.2016
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;
}
Because you haven't gone into detail about exactly what you wanted, this is as close as i could get to what I believe you wanted.
Re: Splitting the scores into two parts -
StrikerZ - 08.10.2016
Quote:
Originally Posted by azzerking
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;
}
Because you haven't gone into detail about exactly what you wanted, this is as close as i could get to what I believe you wanted.
|
Thanks this is what i was looking for