10.10.2010, 14:14
SendDeathMessage is not showing up.. here is my OnPlayerDeath:
I don't see nothing wrong.. thanks.
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new name1[25], name2[25], string[80];
GetPlayerName(killerid, name1, 25);
GetPlayerName(playerid, name2, 25);
//El que mata
GivePlayerMoneyEx(killerid, 500);
SetPlayerScore(killerid, GetPlayerScore(killerid)+1);
SendClientMessage(killerid, COLOR_GREY, "+1 score y $500!");
spree[killerid] = spree[killerid] + 1;
kills[killerid] = kills[killerid] + 1;
//El Muerto
GivePlayerMoneyEx(playerid, -500);
SetPlayerScore(playerid, GetPlayerScore(playerid)-1);
SendClientMessage(playerid, COLOR_GREY, "-1 score y $-500!");
deaths[playerid] = deaths[playerid] + 1;
pSpawned[playerid] = 0;
EnteredArea[playerid] = 0;
pSpawned[playerid] = 0;
LooseWeapons(playerid);
for(new i = 0; i < 47; i++) ArmasJugadores[playerid][i] = 0;
SendDeathMessage(killerid, playerid, reason);
//Destruir bomba
if(gPlayerClass[playerid] == DEMOLITION)
{
TextDrawDestroy(Bomba[playerid]);
if(g_Bombas[playerid] > 1)
{
g_Bombas[playerid] = 0;
SendClientMessage(playerid, COLOR_WHITE, "Has perdido tus bombas!");
if(Planted[playerid] == 1)
{
DestroyObject(C4[playerid]);
Planted[playerid] = 0;
}
}
}
//Killing spree
if(spree[killerid] == 5)
{
format(string, 80, "%s esta en un ~r~killing spree ~w~de 5 muertes!", name1);
TextDrawSetString(Spree, string);
TextDrawShowForAll(Spree);
SetPlayerScore(killerid, GetPlayerScore(killerid)+5);
SendClientMessage(killerid, COLOR_WHITE, "Score +5 por el spree");
SetTimer("TxtReset", 10000, 0);
}
else if(spree[killerid] == 10)
{
format(string, 80, "%s esta en un ~r~killing spree ~w~de 10 muertes!", name1);
TextDrawSetString(Spree, string);
TextDrawShowForAll(Spree);
SetPlayerScore(killerid, GetPlayerScore(killerid)+10);
SendClientMessage(killerid, COLOR_WHITE, "Score +10 por el spree");
SetTimer("TxtReset", 10000, 0);
}
else if(spree[killerid] == 15)
{
format(string, 80, "%s esta en un ~r~killing spree ~w~de 15 muertes!", name1);
TextDrawSetString(Spree, string);
TextDrawShowForAll(Spree);
SetPlayerScore(killerid, GetPlayerScore(killerid)+15);
SendClientMessage(killerid, COLOR_WHITE, "Score +15 por el spree");
SetTimer("TxtReset", 10000, 0);
}
else if(spree[killerid] == 20)
{
format(string, 80, "%s esta en un ~r~killing spree ~w~de 20 muertes!", name1);
TextDrawSetString(Spree, string);
TextDrawShowForAll(Spree);
SetPlayerScore(killerid, GetPlayerScore(killerid)+20);
SendClientMessage(killerid, COLOR_WHITE, "Score +20 por el spree");
SetTimer("TxtReset", 10000, 0);
}
if(spree[killerid] == 25)
{
format(string, 80, "%s esta en un ~r~killing spree ~w~de 25 muertes!", name1);
TextDrawSetString(Spree, string);
TextDrawShowForAll(Spree);
SetPlayerScore(killerid, GetPlayerScore(killerid)+25);
SendClientMessage(killerid, COLOR_WHITE, "Score +25 por el spree");
SetTimer("TxtReset", 10000, 0);
}
if(spree[killerid] == 30)
{
format(string, 80, "%s esta en un ~r~killing spree ~w~de 30 muertes!", name1);
TextDrawSetString(Spree, string);
TextDrawShowForAll(Spree);
SetPlayerScore(killerid, GetPlayerScore(killerid)+30);
SendClientMessage(killerid, COLOR_WHITE, "Score +30 por el spree");
SetTimer("TxtReset", 10000, 0);
}
if(spree[killerid] == 35)
{
format(string, 80, "%s esta en un ~r~killing spree ~w~de 35 muertes!", name1);
TextDrawSetString(Spree, string);
TextDrawShowForAll(Spree);
SetPlayerScore(killerid, GetPlayerScore(killerid)+35);
SendClientMessage(killerid, COLOR_WHITE, "Score +35 por el spree");
SetTimer("TxtReset", 10000, 0);
}
if(spree[killerid] == 40)
{
format(string, 80, "%s esta en un ~r~killing spree ~w~de 40 muertes!", name1);
TextDrawSetString(Spree, string);
TextDrawShowForAll(Spree);
SetPlayerScore(killerid, GetPlayerScore(killerid)+40);
SendClientMessage(killerid, COLOR_WHITE, "Score +40 por el spree");
SetTimer("TxtReset", 10000, 0);
}
if(spree[killerid] == 45)
{
format(string, 80, "%s esta en un ~r~killing spree ~w~de 45 muertes!", name1);
TextDrawSetString(Spree, string);
TextDrawShowForAll(Spree);
SetPlayerScore(killerid, GetPlayerScore(killerid)+45);
SendClientMessage(killerid, COLOR_WHITE, "Score +45 por el spree");
SetTimer("TxtReset", 10000, 0);
}
if(spree[killerid] == 50)
{
SetPlayerScore(playerid, GetPlayerScore(playerid) +5);
format(string, 80, "%s esta en un ~r~killing spree ~w~de 50 muertes!", name1);
TextDrawSetString(Spree, string);
TextDrawShowForAll(Spree);
SetPlayerScore(killerid, GetPlayerScore(killerid)+50);
SendClientMessage(killerid, COLOR_WHITE, "Score +50 por el spree");
SetTimer("TxtReset", 10000, 0);
}
if(spree[killerid] > 50)
{
format(string, 80, "%s esta en un ~r~killing spree ~w~de %d muertes!", name1, spree[killerid]);
TextDrawSetString(Spree, string);
TextDrawShowForAll(Spree);
SetPlayerScore(killerid, GetPlayerScore(killerid)+55);
format(string, 80, "Score +%d por el spree", spree[killerid]);
SendClientMessage(killerid, COLOR_WHITE, string);
SetTimer("TxtReset", 10000, 0);
}
if(spree[playerid] >= 5)
{
format(string, 80, "Finalizу el killing spree de %s", name2);
SendClientMessageToAll(COLOR_CON_GREEN, string);
TextDrawHideForAll(Spree);
spree[playerid] = 0;
}
UpdateGangZones();
return 1;
}