Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- SISTEMA DE RECOMPENSAS
- By:Lucas_Alemao
- ou
- [iPs]Lucas
- */
- #include a_samp
- #include zcmd
- //Defina o valor inicial da recomepnsa.
- #define VALOR_INICIAL 1200
- #define GetarDado(%0,%1) %1[%0]
- const Verde = 0x12C41E96;
- new Recompensa[MAX_PLAYERS];
- new Matou[MAX_PLAYERS];
- new Seguidos[MAX_PLAYERS];
- new str[256];
- public OnFilterScriptInit()
- {
- print("\n\nFS de recompensas By [iPs]Lucas carregado com sucesso\n\n");
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- Recompensa[playerid] = 0;
- Matou[playerid] = 0;
- Seguidos[playerid] = 0;
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- Matou[killerid]++;
- Matou[playerid] = 0;
- Seguidos[killerid]++;
- if(GetarDado(killerid, Matou) == 1)
- {
- Recompensa[killerid] = VALOR_INICIAL;
- }
- else if(GetarDado(killerid, Seguidos) >= 5)
- {
- format(str, sizeof(str), "[ATENÇÃO] O Jogador {0EF01D}%s{12C41E} ja matou %d pessoas consecutivas. Sua cabeça está valendo $%d.", Nome(killerid), GetarDado(killerid, Matou), GetarDado(killerid, Recompensa));
- SendClientMessageToAll(Verde, str);
- Recompensa[killerid] = Recompensa[killerid]*2;
- Seguidos[killerid] = 0;
- }
- if(GetarDado(playerid, Recompensa) > 0)
- {
- GivePlayerMoney(killerid, Recompensa[playerid]);
- format(str, sizeof(str), "[ATENÇÃO] O Jogador {0EF01D}%s{12C41E} Matou {0EF01D}%s{12C41E} e ganhou uma recompensa de $%d.", Nome(killerid), Nome(playerid), GetarDado(playerid, Recompensa));
- SendClientMessageToAll(Verde, str);
- Recompensa[playerid] = 0;
- }
- }
- CMD:cabecas(playerid)
- {
- for(new i = 0; i < MAX_PLAYERS; ++i)
- {
- if(Matou[i] >= 5)
- {
- format(str, sizeof(str), "%s - $%d - Matou: %d", Nome(i), GetarDado(i, Recompensa), GetarDado(i, Matou));
- SendClientMessage(playerid, Verde, str);
- }
- }
- return 1;
- }
- stock Nome(playerid)
- {
- new pname[24];
- GetPlayerName(playerid, pname, 24);
- return pname;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement