02.05.2011, 02:21
--
@apollo
@apollo
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
Delete3DTextLabel(Recompensa[playerid]);
if(GetPlayerScore(killerid) > 10)
{
Delete3DTextLabel(Recompensa[killerid]);
Recompensa[killerid] = Create3DTextLabel("RECOMPENSA 1000$",0xFF000099,0,0,0,50,-1,1);
Attach3DTextLabelToPlayer(Recompensa[killerid], killerid, 0,0,0);
}
SendDeathMessage(killerid, playerid, reason); //Mensagem MATOU - MORREU na tela
SetPlayerScore(killerid,(GetPlayerScore(killerid))+1); //+1 ponto para quem matou
SetPlayerScore(playerid,(GetPlayerScore(playerid))-1); //-1 ponto para quem morreu
new string[50];
format(string, sizeof(string), "~w~Morto");
GameTextForPlayer(playerid, string, 3000, 2);
return 1;
}