09.07.2015, 16:02
(
Последний раз редактировалось Lуs; 09.07.2015 в 17:47.
)
a minha public onplayerdeath nao ta executando nenhuma funзгo gente.. por favor me ajudem ja tentei de tudo e nao consegui!
eu nao quero pagar de folgado mas se alguem sabe colocar tudo na ordem certa pf faзa isso por mim eu peзo de coraзгo! eu ja tentei varios e nao resultou em nada
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new str[128];
if(playerid != INVALID_PLAYER_ID)
{
PlayerInfo[killerid][Kills] ++;
PlayerInfo[playerid][Deaths] ++;
if(IsPlayerInAnyVehicle(killerid)) PlayerInfo[killerid][CarKills] ++;
SetPlayerScore(killerid,GetPlayerScore(killerid) + 1);
GivePlayerMoney(killerid,2000);
EmEvento[playerid] = 0;
if(CreatedVehicle[playerid]) DestroyVehicle(CreatedVehicle[playerid]);
LooseWeapons(playerid);
SendDeathMessage(killerid,playerid,reason);
}
if(DuelInfo[EmUso] == 1)
{
new duelstr[128];
format(duelstr,sizeof(duelstr),"[DUELO] %s ganhou um duelo contra %s.",nome(killerid),nome(playerid));
SendClientMessageToAll(0x00FFFFFF,duelstr);
PlayerInfo[playerid][Duelando] = 0;
PlayerInfo[killerid][Duelando] = 0;
DuelInfo[EmUso] = 0;
SetPlayerArmour(killerid,0.0);
SpawnPlayer(killerid);
}
if(killerid != INVALID_PLAYER_ID)
{
TogglePlayerSpectating(playerid, true);
PlayerSpectatePlayer(playerid, killerid);
if(!IsPlayerInAnyVehicle(killerid)) PlayerSpectatePlayer(playerid, killerid);
else PlayerSpectateVehicle(playerid, GetPlayerVehicleID(killerid), SPECTATE_MODE_NORMAL);
SetTimerEx("AcabarSpecDeath", 5000, false, "i", playerid);
GameTextForPlayer(playerid,"~w~Respawn em 5 segundos...",5000,1);
}
if(IsPlayerJustice(playerid) && !IsPlayerJustice(killerid))
{
PlayerInfo[killerid][Recompensa] += 3000;
if(PlayerInfo[killerid][Recompensa] >= 12000)
{
format(str, sizeof(str), "%s agora tem uma recompensa de $%d. /localizar %d", nome(killerid), PlayerInfo[killerid][Recompensa],killerid);
SendClientMessageToAll(cor_amarelo, str);
format(str,sizeof(str),"Procurado: $%d",PlayerInfo[killerid][Recompensa]);
UpdatePlayer3DTextLabelText(killerid, procurado[killerid], 0xFABF1BFF, str);
}
if(PlayerInfo[playerid][Recompensa] >= 3000)
{
GivePlayerMoney(killerid, PlayerInfo[playerid][Recompensa]);
format(str, sizeof(str), "Vocк recebeu $%d de recompensa por matar %s (%d)", PlayerInfo[playerid][Recompensa], nome(playerid), playerid);
SendClientMessage(killerid, cor_amarelo, str);
UpdatePlayer3DTextLabelText(playerid, procurado[playerid], 0xFABF1BFF, "");
PlayerInfo[playerid][Recompensa] = 0;
}
}
return 1;
}