Player Score
#1

Hello, i have one question! What i need to put in my script to it showed not cashscore, but kills? Thank You and sorry for my bad english, i am latvian!
Reply
#2

TDM server or roleplay?
Reply
#3

Deathmatch, but is that metter what type server?
Reply
#4

it can because of teams or no teams etc that why we have to know
Reply
#5

Quote:
Originally Posted by [GD59
Doberman™ [Styrna] ]
Deathmatch, but is that metter what type server?
emm i think i sayd whats the server type, please do not offtopic, better help me, please!
Reply
#6

Look for
SetPlayerScore(playerid,GetPlayerMoney(playerid));
remove it and add OnPlayerDeath
pawn Код:
SetPlayerScore(killerid,GetPlayerScore(killerid)+1); // Killer gets 1 score
//and if you want
SetPlayerScore(playerid,GetPlayerScore(playerid)-1); // Killed player gets -1 score
Reply
#7

Ehhh, i tested, it doesn't work, can you just fix that code?:

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
  new playercash;
	if(killerid == INVALID_PLAYER_ID) {
    SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);
    GivePlayerMoney(playerid, -500);
	} else {
	  	SendDeathMessage(killerid,playerid,reason);
			SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
			playercash = GetPlayerMoney(playerid);
			if (playercash > 0) {
				GivePlayerMoney(killerid, 500);
			}
			else
			{
			}
   	}
 	return 1;
}
Reply
#8

Quote:
Originally Posted by [GD59
Doberman™ [Styrna] ]
Ehhh, i tested, it doesn't work, can you just fix that code?:

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
  new playercash;
	if(killerid == INVALID_PLAYER_ID) {
    SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);
    GivePlayerMoney(playerid, -500);
	} else {
	  	SendDeathMessage(killerid,playerid,reason);
			SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
			playercash = GetPlayerMoney(playerid);
			if (playercash > 0) {
				GivePlayerMoney(killerid, 500);
			}
			else
			{
			}
  	}
 	return 1;
}
hmm... code looks ok for me... :S
Reply
#9

Quote:
Originally Posted by [GD59
Doberman™ [Styrna] ]
Ehhh, i tested, it doesn't work, can you just fix that code?:

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
  new playercash;
	if(killerid == INVALID_PLAYER_ID) {
    SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);
    GivePlayerMoney(playerid, -500);
	} else {
	  	SendDeathMessage(killerid,playerid,reason);
			SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
			playercash = GetPlayerMoney(playerid);
			if (playercash > 0) {
				GivePlayerMoney(killerid, 500);
			}
			else
			{
			}
  	}
 	return 1;
}
try changing the } else {
to
pawn Код:
}
else
{
Reply
#10

Quote:
Originally Posted by Criss_Angel
Quote:
Originally Posted by [GD59
Doberman™ [Styrna] ]
Ehhh, i tested, it doesn't work, can you just fix that code?:

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
  new playercash;
	if(killerid == INVALID_PLAYER_ID) {
    SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);
    GivePlayerMoney(playerid, -500);
	} else {
	  	SendDeathMessage(killerid,playerid,reason);
			SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
			playercash = GetPlayerMoney(playerid);
			if (playercash > 0) {
				GivePlayerMoney(killerid, 500);
			}
			else
			{
			}
  	}
 	return 1;
}
try changing the } else {
to
pawn Код:
}
else
{
I don't think that would change something... :S
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)