toribio

toribio

Oct 7th, 2008
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.75 KB | None | 0 0
  1. public OnPlayerDeath(playerid, killerid, reason)
  2. {
  3.     new killedplayer[MAX_PLAYER_NAME], string[256];
  4.     if(killerid == INVALID_PLAYER_ID)
  5.     {
  6.             SendDeathMessage(INVALID_PLAYER_ID, playerid, reason);
  7.     } else {
  8.         SendDeathMessage(killerid, playerid, reason);
  9.         SetPlayerScore(killerid, GetPlayerScore(killerid)+1);
  10.         if(Cartao[playerid] > 0 && !Cartao[killerid])
  11.         {
  12.             GetPlayerName(playerid, killedplayer, sizeof(killedplayer));
  13.             format(string, sizeof(string), "Voc� ganhou passagem para Liberty City %d pois matou %s que tinha a passagem.", Cartao[playerid], killedplayer);
  14.             SendClientMessage(killerid, COLOR_GREEN, string);
  15.             Cartao[killerid] = Cartao[playerid];
  16.             Cartao[playerid] = 0;
  17.         }
  18.     }
  19.     //fim do OnPlayerDeath se for aqui...
  20.     return 1;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment