Tess:
A mode-ban
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid == INVALID_PLAYER_ID) {
SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);
} else {
if(gTeam[killerid] != gTeam[playerid]) {
// Valid kill
SendDeathMessage(killerid,playerid,reason);
SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
}
Van levelSystem scriptem és abban is van OnPlayerDeath:
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid == INVALID_PLAYER_ID) return 0;
else
{
new str[128], killer[MAX_PLAYER_NAME];
Score[killerid] = GetPlayerScore(killerid);
Score[playerid] = GetPlayerScore(playerid);
GetPlayerName(killerid,killer,50);
SendDeathMessage(killerid,playerid,reason);
SetPlayerScore(playerid,Score[playerid]-1);
SetPlayerScore(killerid,Score[killerid]+1);
if(Score[killerid] == Level2)
{
......