24.07.2009, 13:38
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!
Originally Posted by [GD59
Doberman™ [Styrna] ]
Deathmatch, but is that metter what type server? |
SetPlayerScore(killerid,GetPlayerScore(killerid)+1); // Killer gets 1 score
//and if you want
SetPlayerScore(playerid,GetPlayerScore(playerid)-1); // Killed player gets -1 score
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; }
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; } |
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; } |
}
else
{
Originally Posted by Criss_Angel
Quote:
to pawn Код:
|