Novidades

3/23/2021

CharaDa_Fox

FILTERSCRIPT SAMP SISTEMA DE POLICIAL ORG POLICIAL CRIME BANDIDO PARA SERVIDOR ANDROID

 Comandos:


/procurados



-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Codigo - Pastebin

Prints
  1. Sistema de Procurados | Wanted System
  2.  
  3. Desenvolvido por: Bruno.
  4.  */
  5.  
  6. #include "a_samp"
  7. #include "zcmd"
  8.  
  9. // Enumeradores //
  10.  
  11. enum pwanted
  12. {
  13.     w_KillsData,
  14.     w_LevelsData,
  15.     w_RewardData,
  16.     w_ScoreData,
  17.     bool:w_Wanted,
  18. }
  19.  
  20. new pWantedData[MAX_PLAYERS][pwanted];
  21.  
  22.  
  23. public OnPlayerConnect(playerid)
  24. {
  25.     pWantedData[playerid][w_KillsData] = 0;
  26.     pWantedData[playerid][w_LevelsData] = 0;
  27.     pWantedData[playerid][w_ScoreData] = 0;
  28.     pWantedData[playerid][w_RewardData] = 0;
  29.     pWantedData[playerid][w_Wanted] = false;
  30.    
  31.     return 1;
  32. }
  33.  
  34. public OnPlayerDeath(playerid, killerid, reason)
  35. {
  36.     new strmsg[200], namedead[MAX_PLAYER_NAME], namekiller[MAX_PLAYER_NAME];
  37.  
  38.     SendDeathMessage(killerid, playerid, reason);
  39.  
  40.     if(killerid != INVALID_PLAYER_ID)
  41.     {
  42.         pWantedData[killerid][w_KillsData] ++;
  43.         if(pWantedData[playerid][w_Wanted] == true)
  44.         {
  45.             GetPlayerName(killerid, namekiller, sizeof namekiller);
  46.             GetPlayerName(playerid, namedead, sizeof namedead);
  47.  
  48.             GivePlayerMoney(killerid, pWantedData[playerid][w_RewardData]);
  49.             SetPlayerScore(killerid, pWantedData[playerid][w_ScoreData]);
  50.             format(strmsg, sizeof strmsg, "{00FF00}Procurados | {87CEFA}O cacador de procurados '%s' matou o matador de noobs '%s'! (Recompensas: Dinheiro %d | Score: %d)", namekiller, namedead, pWantedData[playerid][w_RewardData], pWantedData[playerid][w_ScoreData]);
  51.             SendClientMessageToAll(-1, strmsg);
  52.         }
  53.     }
  54.     ws_CheckKills(killerid);
  55.  
  56.     pWantedData[playerid][w_Wanted] = false;
  57.     pWantedData[playerid][w_KillsData] = 0;
  58.     pWantedData[playerid][w_LevelsData] = 0;
  59.     pWantedData[playerid][w_ScoreData] = 0;
  60.     pWantedData[playerid][w_RewardData] = 0;
  61.     SetPlayerWantedLevel(playerid, 0);
  62.    
  63.     return 1;
  64. }
  65.  
  66. //Funçoes
  67.  
  68. ws_CheckKills(killerid)
  69. {
  70.     new ws_StringKills[500];
  71.  
  72.     if(pWantedData[killerid][w_KillsData] == 10 || pWantedData[killerid][w_KillsData] == 20 || pWantedData[killerid][w_KillsData] == 30 || pWantedData[killerid][w_KillsData] == 40 || pWantedData[killerid][w_KillsData] == 50)
  73.     {
  74.         pWantedData[killerid][w_Wanted] = true;
  75.         pWantedData[killerid][w_LevelsData] ++;
  76.         pWantedData[killerid][w_RewardData] += 10000;
  77.         pWantedData[killerid][w_ScoreData] += 5;
  78.  
  79.         new name[MAX_PLAYER_NAME];
  80.         GetPlayerName(killerid, name, sizeof name);
  81.  
  82.         format(ws_StringKills, sizeof ws_StringKills, "{00FF00}Procurados | {87CEFA}O(a) miseravel do(a)  %s, ja matou '%d' noobs sem morrer!,  o(a) maluco(a) é foda! {FFFF00}(/procurados)", name, pWantedData[killerid][w_KillsData]);
  83.         SendClientMessageToAll(-1, ws_StringKills);
  84.         SetPlayerWantedLevel(killerid, pWantedData[killerid][w_LevelsData]);       
  85.     }
  86.  
  87.     return 1;
  88. }
  89. // Comandos
  90.  
  91. //Comando de teste (pode remover sem poblemas.)
  92. CMD:arma(playerid)
  93. {
  94.     GivePlayerWeapon(playerid, 24, 2000);
  95.     GivePlayerWeapon(playerid, 26, 2999);
  96.     GivePlayerWeapon(playerid, 29, 2000);
  97.  
  98.     return 1;
  99. }
  100.  
  101. CMD:procurados(playerid)
  102. {
  103.     new str_procurados[1024], string[600], namewanteds[MAX_PLAYER_NAME];
  104.  
  105.     strins(str_procurados, "Nomes\t Estrelas\t Recompensa\tScore\n", strlen(str_procurados));
  106.     for(new i; i < MAX_PLAYERS; i++)
  107.     {
  108.         if(IsPlayerConnected(i) && pWantedData[i][w_KillsData] >= 10)
  109.         {
  110.             GetPlayerName(i, namewanteds, sizeof namewanteds);
  111.             format(string, sizeof string, "{87CEFA}%s\t {87CEFA}%d\t{7FFF00}R$ {87CEFA}%d\t{87CEFA}%d\n", namewanteds, pWantedData[i][w_LevelsData], pWantedData[i][w_RewardData], pWantedData[i][w_ScoreData]);
  112.             strcat(str_procurados, string);
  113.         }
  114.     }
  115.     ShowPlayerDialog(playerid, 2001, DIALOG_STYLE_TABLIST_HEADERS, "Procurados", str_procurados, "Fechar", "");
  116.    
  117.     return 1;
  118. }

Subscribe to this Blog via Email :
Previous
Next Post »