Splitting the scores into two parts
#1

How can i split the scores into police scores and criminal scores?I'm using cScore and rScore in the playerinfo enum
Reply
#2

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
Reply
#3

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
Reply
#4

https://sampwiki.blast.hk/wiki/SetPlayerScore
Reply
#5

-__- . Bro lol im not talking about this. HOW can i make the GetPlayerScore line for cScore and rScore?
Reply
#6

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]
Reply
#7

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.
Reply
#8

I think you're looking for
SetPlayerWantedLevel(playerid, /*The score*/);
based on your replies.
Reply
#9

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.
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)