Guest User

Untitled

a guest
Jul 9th, 2011
402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.27 KB | None | 0 0
  1. #include a_samp
  2. #include zcmd
  3. #include sscanf
  4.  
  5. new giveid,
  6. grana,
  7. Valor[MAX_PLAYERS],
  8. vitima[MAX_PLAYER_NAME],
  9. crioumatou[MAX_PLAYER_NAME],
  10. _Str[128];
  11.  
  12. public OnPlayerDeath(playerid, killerid, reason)
  13. {
  14.     if(Valor[playerid] > 0) {
  15.         GetPlayerName(giveid, vitima, sizeof(vitima));
  16.         GetPlayerName(playerid, crioumatou, sizeof(crioumatou));
  17.         format(_Str, sizeof(_Str), "'%s' caçou e matou '%s' e adquiriu uma quantia de 'R$ %d '.", crioumatou, vitima,Valor[playerid]);
  18.         SendClientMessageToAll(0xFF7979FF, _Str);
  19.         format(_Str, sizeof(_Str), "Parabéns! voce matou '%s' e ganhou 'R$ %d '", vitima, Valor[playerid]);
  20.         SendClientMessage(killerid, 0xFF7979FF, _Str);
  21.         GivePlayerMoney(killerid, Valor[playerid]);
  22.         Valor[playerid] = 0;
  23.     }
  24.     return true;
  25. }
  26.  
  27.  
  28. CMD:hitman(playerid,params[])
  29. {
  30.     if(sscanf(params, "ud", giveid,grana))return SendClientMessage(playerid, 0xFF7979FF, "Correto: /hitman [ID] [Grana]");
  31.     if(grana > GetPlayerMoney(playerid)) return SendClientMessage(playerid, 0xFF7979FF, "Você não tem esse dinheiro.");
  32.     if(grana <= 500 || grana >= 10000)return  SendClientMessage(playerid, 0xFF7979FF, " Valor entre 500 e 10000 R$");
  33.     if(!IsPlayerConnected(giveid))return SendClientMessage(playerid, 0xFF7979FF, "Player não conectado!");
  34.     Valor[giveid]+=grana;
  35.     GivePlayerMoney(playerid, -grana);
  36.     GetPlayerName(giveid, vitima, sizeof(vitima));
  37.     GetPlayerName(playerid, crioumatou, sizeof(crioumatou));
  38.     format(_Str, sizeof(_Str), "'%s' criou uma encomenda de morte em '%s' no valor de '%d R$' |Total: $%d|.", crioumatou, vitima, grana, Valor[giveid]);
  39.     SendClientMessageToAll(0xFF7979FF, _Str);
  40.     format(_Str, sizeof(_Str), "%s encomendou sua morte no valor de 'R$ %d' .", crioumatou, grana);
  41.     SendClientMessage(giveid, 0xFF7979FF, _Str);
  42.     return true;
  43. }
  44.  
  45.  
  46. CMD:vitimas(playerid,params[])
  47. {
  48.     SendClientMessage(playerid, 0xFF7979FF, "_____Encomendas______");
  49.     for(new _c=0; _c < MAX_PLAYERS; _c++) {
  50.         if(Valor[_c] > 0) {
  51.             GetPlayerName(_c, vitima, sizeof(vitima));
  52.             format(_Str, sizeof(_Str), "Vitima:%s : Valor 'R$ %d'",vitima,Valor[_c]);
  53.             SendClientMessage(playerid,0xFF7979FF,_Str);
  54.         }
  55.     }
  56.     return true;
  57. }
Advertisement
Add Comment
Please, Sign In to add comment