Advertisement
Guest User

Untitled

a guest
Oct 31st, 2010
801
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 4.23 KB | None | 0 0
  1. //==============================================================================
  2. #include <a_samp>
  3. #define FILTERSCRIPT
  4. #define MAX_ROUBO 500
  5. //==============================================================================
  6. new string[24];
  7. //==============================================================================
  8. new Roubos=-1;
  9. new bool:Roubou[MAX_ROUBO];
  10. new bool:LUGAR[MAX_PLAYERS];
  11. enum pRoubo
  12. {
  13.     NomeRoubo[100],
  14.     Float:xp,
  15.     Float:yp,
  16.     Float:zp,
  17.     ID
  18. };
  19. new PlayerRoubo[MAX_ROUBO][pRoubo];
  20. //==============================================================================
  21. public OnFilterScriptInit()
  22. {
  23.     print("\n--------------------------------------");
  24.     print("Sistemas de Roubos By:[FeK]HigorOliver");
  25.     print("--------------------------------------\n");
  26. //=====
  27.     RouboADD("Banco Fek Squad",1209.8090,-1751.8210,13.5937);
  28. //=====
  29.     return 1;
  30. }
  31.  
  32.  
  33. //==============================================================================
  34. stock RouboADD(nomete[], Float:xb, Float:yb, Float:zb)
  35. {
  36.     Roubos++;
  37.     format(PlayerRoubo[Roubos][NomeRoubo],100,"%s",nomete);
  38.     PlayerRoubo[Roubos][xp] = xb;
  39.     PlayerRoubo[Roubos][yp] = yb;
  40.     PlayerRoubo[Roubos][zp] = zb;
  41.     PlayerRoubo[Roubos][ID] = Roubos;
  42.     return 1;
  43. }
  44.  
  45. public OnPlayerConnect(playerid)
  46. {
  47.     Roubou[playerid] = true;
  48.     return 1;
  49. }
  50.  
  51. //==============================================================================
  52. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  53. {
  54.     new bosta = listitem;
  55.     new stromg[128];
  56.     if(bosta == PlayerRoubo[bosta][ID]) {
  57.         if(!response) return false;
  58.         format(stromg, sizeof(stromg), "Roubo: %s  Esta marcado no mapa", PlayerRoubo[bosta][NomeRoubo]);
  59.         SendClientMessage(playerid, 0xFFFFFFFF, stromg);
  60.         LUGAR[playerid] = true;
  61.         SetPlayerCheckpoint(playerid,PlayerRoubo[bosta][xp],PlayerRoubo[bosta][yp],PlayerRoubo[bosta][zp]+1,2.0);
  62.         return 1;
  63.     }
  64.     return 0;
  65. }
  66.  
  67.  
  68. //==============================================================================
  69. public OnPlayerCommandText(playerid, cmdtext[])
  70. {
  71.     if(!strcmp(cmdtext, "/roubos", true)) {
  72.         new dados[1024];
  73.         format(dados, 1024, "");
  74.         for(new lol=0;lol<=Roubos;lol++) {
  75.             format(dados,1024, "%s%s\n",dados,PlayerRoubo[lol][NomeRoubo]);
  76.         }
  77.         ShowPlayerDialog(playerid,256,DIALOG_STYLE_LIST, "Lugares para Roubo",dados,"Ir", "Fechar");
  78.     }
  79.  
  80.     return 0;
  81. }
  82.  
  83.  
  84. //==============================================================================
  85. public OnPlayerEnterCheckpoint(playerid)
  86. {
  87.     if(LUGAR[playerid] == true)
  88.     {
  89.        if(Roubou[playerid] != true)
  90.             return SendClientMessage(playerid,0xFFFFFFFF,"Espere 10 minultos para roubar de novo.");
  91.            
  92.        DisablePlayerCheckpoint(playerid);
  93.        SendClientMessage(playerid,0xFFFFFFFF,"Aguarde 10 segundos abrindo o cofre");
  94.        
  95.        ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
  96.        ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
  97.        ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
  98.        ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
  99.        
  100.        LUGAR[playerid] = false;
  101.        SetTimerEx("RoubarCofre",10000,false,"i",playerid);
  102.        SetTimerEx("LRoubo",600000,false,"i",playerid);
  103.     }
  104.     return 1;
  105. }
  106.  
  107.  
  108. //==============================================================================
  109. forward LRoubo(playerid);
  110. public  LRoubo(playerid)
  111. {
  112.     Roubou[playerid] = false;
  113.     SendClientMessage(playerid,GetPlayerColor(playerid),"Você ja pode retornar o crime !");
  114.     return false;
  115. }
  116. //==============================================================================
  117. forward RoubarCofre(playerid);
  118. public RoubarCofre(playerid)
  119. {
  120.     ClearAnimations(playerid);
  121.     new Dinheiro = 1000 + random(3000);
  122.     format(string, sizeof(string), "~ Você Ganhou %d roubando cofre | Corre Corre Corre!!!!!", Dinheiro);
  123.     SendClientMessage(playerid,GetPlayerColor(playerid),string);
  124.     SetPlayerWantedLevel(playerid,GetPlayerWantedLevel(playerid)+4);
  125.     GivePlayerMoney(playerid,Dinheiro);
  126.     Roubou[playerid] = true;
  127.     return true;
  128. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement