Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include a_samp
- #include zcmd
- #include sscanf
- new giveid,
- grana,
- Valor[MAX_PLAYERS],
- vitima[MAX_PLAYER_NAME],
- crioumatou[MAX_PLAYER_NAME],
- _Str[128];
- public OnPlayerDeath(playerid, killerid, reason)
- {
- if(Valor[playerid] > 0) {
- GetPlayerName(giveid, vitima, sizeof(vitima));
- GetPlayerName(playerid, crioumatou, sizeof(crioumatou));
- format(_Str, sizeof(_Str), "'%s' caçou e matou '%s' e adquiriu uma quantia de 'R$ %d '.", crioumatou, vitima,Valor[playerid]);
- SendClientMessageToAll(0xFF7979FF, _Str);
- format(_Str, sizeof(_Str), "Parabéns! voce matou '%s' e ganhou 'R$ %d '", vitima, Valor[playerid]);
- SendClientMessage(killerid, 0xFF7979FF, _Str);
- GivePlayerMoney(killerid, Valor[playerid]);
- Valor[playerid] = 0;
- }
- return true;
- }
- CMD:hitman(playerid,params[])
- {
- if(sscanf(params, "ud", giveid,grana))return SendClientMessage(playerid, 0xFF7979FF, "Correto: /hitman [ID] [Grana]");
- if(grana > GetPlayerMoney(playerid)) return SendClientMessage(playerid, 0xFF7979FF, "Você não tem esse dinheiro.");
- if(grana <= 500 || grana >= 10000)return SendClientMessage(playerid, 0xFF7979FF, " Valor entre 500 e 10000 R$");
- if(!IsPlayerConnected(giveid))return SendClientMessage(playerid, 0xFF7979FF, "Player não conectado!");
- Valor[giveid]+=grana;
- GivePlayerMoney(playerid, -grana);
- GetPlayerName(giveid, vitima, sizeof(vitima));
- GetPlayerName(playerid, crioumatou, sizeof(crioumatou));
- format(_Str, sizeof(_Str), "'%s' criou uma encomenda de morte em '%s' no valor de '%d R$' |Total: $%d|.", crioumatou, vitima, grana, Valor[giveid]);
- SendClientMessageToAll(0xFF7979FF, _Str);
- format(_Str, sizeof(_Str), "%s encomendou sua morte no valor de 'R$ %d' .", crioumatou, grana);
- SendClientMessage(giveid, 0xFF7979FF, _Str);
- return true;
- }
- CMD:vitimas(playerid,params[])
- {
- SendClientMessage(playerid, 0xFF7979FF, "_____Encomendas______");
- for(new _c=0; _c < MAX_PLAYERS; _c++) {
- if(Valor[_c] > 0) {
- GetPlayerName(_c, vitima, sizeof(vitima));
- format(_Str, sizeof(_Str), "Vitima:%s : Valor 'R$ %d'",vitima,Valor[_c]);
- SendClientMessage(playerid,0xFF7979FF,_Str);
- }
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment