20.07.2012, 18:49
I have this problem with OnPlayerDeath !
http://www.youtube.com/watch?v=qXcNT...ature=*********
Can anyone help me.
http://www.youtube.com/watch?v=qXcNT...ature=*********
Can anyone help me.
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
PInfo[killerid][pKill] += 1;
PInfo[playerid][pDeaths] += 1;
DisablePlayerRaceCheckpoint(playerid);
DisablePlayerCheckpoint(playerid);
DakarRacer[playerid] = 0;
Forester[playerid] = 0;
Dostava[playerid] = 0;
if(ForestRed[playerid] == 1)
{
new string[256];
ForestC -= 1;
ForestRed[playerid] = 0;
format(string, 256, "~r~CRVENI: ~w~%d /// ~b~PLAVI: ~w~%d", ForestC, ForestP);
TextDrawSetString(Event, string);
TextDrawHideForPlayer(playerid, Event);
}
if(ForestBlue[playerid] == 1)
{
new string[256];
ForestP -= 1;
ForestBlue[playerid] = 0;
format(string, 256, "~r~CRVENI: ~w~%d /// ~b~PLAVI: ~w~%d", ForestC, ForestP);
TextDrawSetString(Event, string);
TextDrawHideForPlayer(playerid, Event);
}
if(Meta[playerid] == 1)
{
Meta[playerid] = 0;
Meta[killerid] = 1;
SetPlayerColor(playerid, TEAM_HIT_COLOR);
SetPlayerColor(killerid, COLOR_LIGHTBLUE);
new string[256];
new p1[MAX_PLAYER_NAME], p2[MAX_PLAYER_NAME];
GetPlayerName(playerid, p1, sizeof(p1));
GetPlayerName(killerid, p2, sizeof(p2));
format(string, sizeof(string), "SERVER: Meta (%s) je ubijena od strane (%s) - sada on postaje meta.", p1, p2);
SendClientMessageToAll(COLOR_LIGHTBLUE, string);
}
if(hit[playerid] == 1 && HitInfo[killerid][hitHit] == 1 && PInfo[killerid][pMember] == 6)
{
if(hitmanid[killerid] == playerid)
{
new string[256], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
new level = PInfo[playerid][pScore];
new pdclan = 500*IsACop(playerid);
HitInfo[killerid][hitCijena] = level*100+pdclan;
format(string, sizeof(string), "HITMAN AGENCY: Uspjesno ste rjesili svoju metu pod imenom %s te ste dobili $%d.", name, HitInfo[killerid][hitCijena]);
SCM(killerid, COLOR_GOLD, string);
GivePlayerMoney(killerid, HitInfo[killerid][hitCijena]);
HitInfo[killerid][hitHit] = 0;
GivePlayerMoney(playerid, 100);
SetPlayerColor(playerid,TEAM_HIT_COLOR);
SetTimerEx("HitTime", 180000, false, "%d", playerid);
}
}
if(Speced[playerid] == 1)
{
foreach(Player,i)
{
if(spectatorid[i] == playerid)
{
PlayerSpectatePlayer(i, playerid);
}
}
return 1;
}
//WL
if(IsCopClose(killerid))
{
if(PInfo[killerid][pMember] != 1 && PInfo[playerid][pMember] == 1)
{
if(PInfo[killerid][pWanted] < 6)
{
new name[MAX_PLAYER_NAME], string[256];
GetPlayerName(killerid, name, sizeof(name));
PInfo[killerid][pWanted] = 6;
SetPlayerWantedLevel(killerid, 6);
Clearable[killerid] = 0;
SCM(killerid, COLOR_LIGHTRED, "INFO: Pocinili ste zlocin 'ubojstvo sluzbene osobe' - dobili ste wanted level 6.");
format(string, sizeof(string), "WANTED INFO: Igrac %s je pocinio zlocin 'ubojstvo sluzbene osobe' - dobio je wanted level 6.", name);
SendRadioMessage(1, COLOR_SVJETLOPLAVA, string);
}
}
else if(PInfo[killerid][pMember] != 1 && PInfo[playerid][pMember] != 1)
{
if(PInfo[killerid][pWanted] < 5)
{
new name[MAX_PLAYER_NAME], string[256];
GetPlayerName(killerid, name, sizeof(name));
PInfo[killerid][pWanted] = 5;
SetPlayerWantedLevel(killerid, 5);
Clearable[killerid] = 0;
SCM(killerid, COLOR_LIGHTRED, "INFO: Pocinili ste zlocin 'ubojstvo prvog stupnja' - dobili ste wanted level 5.");
format(string, sizeof(string), "WANTED INFO: Igrac %s je pocinio zlocin 'ubojstvo prvog stupnja' - dobio je wanted level 5.", name);
SendRadioMessage(1, COLOR_SVJETLOPLAVA, string);
}
}
}
GivePlayerMoney(playerid, 100);
if(PlayerTied[playerid] > 0) { KillTimer(tied[playerid]); TogglePlayerControllable(playerid, 1); PlayerTied[playerid] = 0; }
DisablePlayerCheckpoint(playerid);
Delator[playerid] = 0;
return 1;
}