Extraterrestre

System Concessionaire - Lowly Brazilian

Sep 9th, 2016
602
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.13 KB | None | 0 0
  1. /*=========================================
  2. || NÃO RETIRE OS CREDITOS!!! ||
  3. || LOWLY BRAZILIAN ||
  4. || (Y) ||
  5. ==========================================*/
  6. #include <a_samp>
  7. #include <zcmd>
  8. #include <sscanf2>
  9.  
  10. #define DIALOG_CONC 1
  11.  
  12. // === CONC === //
  13. new SelecCarm[MAX_PLAYERS];
  14. new Comprando[MAX_PLAYERS];
  15. // === FORWARD === //
  16. forward TempConsCar(playerid);
  17.  
  18.  
  19. public OnFilterScriptInit()
  20. {
  21. print("\n---------------------------------------");
  22. print(" Filter Script Feito por: Lowly Brazilian");
  23. print("---------------------------------------\n");
  24.  
  25. AddStaticPickup(1239, 23, -1658.5073,1210.1161,7.2500); // Pickup Local da Venda!!
  26.  
  27. Create3DTextLabel("Concessionária Lowly Brazilian\n Use : /Comprar", -1, -1658.5073,1210.1161,7.2500, 50, 0, 1); // TextLabel Local da Venda!!
  28. return 1;
  29. }
  30.  
  31. public OnFilterScriptExit()
  32. {
  33. return 1;
  34. }
  35.  
  36. main()
  37. {
  38. print("\n---------------------------------------");
  39. print(" Filter Script Feito por: Lowly Brazilian");
  40. print("---------------------------------------\n");
  41. }
  42.  
  43.  
  44.  
  45. CMD:conc(playerid, params[])
  46. {
  47. SetPlayerPos(playerid,-1647.7804,1205.8663,21.1563);
  48. return 1;
  49. }
  50.  
  51. CMD:comprar(playerid, params[])
  52. {
  53. if(Comprando[playerid] == 1) return SendClientMessage(playerid, -1, "Você já realizou um pedido de uma moto , aguarde o termino da Compra!");
  54.  
  55. ShowPlayerDialog(playerid, DIALOG_CONC, DIALOG_STYLE_LIST, "Concessonaria de Motos", "R1\nHornet\nCB300", "Selecionar", "Sair");
  56. return 1;
  57. }
  58.  
  59. // ==== [ COMANDO EXTRA ] ==== //
  60. CMD:dargrana(playerid, params[])
  61. {
  62. static string[60], ele, grana;
  63. if(sscanf(params, "ud", ele, grana)) return SendClientMessage(playerid, -1, "Use: /dargrana [id] [grana]");
  64.  
  65. if(!IsPlayerConnected(ele)) return SendClientMessage(playerid, -1, "Jogador não esta online!");
  66.  
  67. new pname[MAX_PLAYER_NAME];
  68. GetPlayerName(ele, pname, MAX_PLAYER_NAME);
  69.  
  70. format(string, sizeof(string), "Você deu ao player: %s a a quantia de R$%d.", pname, grana);
  71. SendClientMessage(playerid, -1, string);
  72. format(string, sizeof(string), "%s, você recebeu de um admin a quantia de R$%d.", pname, grana);
  73. SendClientMessage(ele, -1, string);
  74.  
  75. GivePlayerMoney(ele,grana);
  76. return 1;
  77. }
  78.  
  79. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  80. {
  81. if(dialogid == DIALOG_CONC)
  82. {
  83. if(!response) { return 1; }
  84. switch(listitem)
  85. {
  86. case 0: //R1
  87. {
  88. if(GetPlayerMoney(playerid) < 70000) return SendClientMessage(playerid, -1, "Você não tem essa quantia de dinheiro!");
  89.  
  90. SendClientMessage(playerid, -1, "Você escolheu a moto R1, Iremos montar a moto e em breve entraremos em Contato com o Senhor(a)!");
  91.  
  92. SelecCarm[playerid] = 1;
  93. Comprando[playerid] = 1;
  94.  
  95. SetTimerEx("TempConsCar", 60000, false, "i", playerid); // em 60000 você pode alterar conforme o gosto de vocês , lembrando que isso é o tempo (1000) 1 segundo!
  96.  
  97. GivePlayerMoney(playerid, -70000);
  98.  
  99. }
  100. case 1: //Hornet
  101. {
  102. if(GetPlayerMoney(playerid) < 29000) return SendClientMessage(playerid, -1, "Você não tem essa quantia de dinheiro!");
  103.  
  104. SendClientMessage(playerid, -1, "Você escolheu a moto HORNET, Iremos montar a moto e em breve entraremos em Contato com o Senhor(a)!");
  105.  
  106. SelecCarm[playerid] = 2;
  107. Comprando[playerid] = 1;
  108.  
  109. SetTimerEx("TempConsCar", 60000, false, "i", playerid); // em 60000 você pode alterar conforme o gosto de vocês , lembrando que isso é o tempo (1000) 1 segundo!
  110.  
  111. GivePlayerMoney(playerid, -29000);
  112. }
  113. case 2: //CB300
  114. {
  115. if(GetPlayerMoney(playerid) < 13000) return SendClientMessage(playerid, -1, "Você não tem essa quantia de dinheiro!");
  116.  
  117. SendClientMessage(playerid, -1, "Você escolheu a moto CB 300, Iremos montar a moto e em breve entraremos em Contato com o Senhor(a)!");
  118.  
  119. SelecCarm[playerid] = 3;
  120. Comprando[playerid] = 1;
  121.  
  122. SetTimerEx("TempConsCar", 60000, false, "i", playerid); // em 60000 você pode alterar conforme o gosto de vocês , lembrando que isso é o tempo (1000) 1 segundo!
  123.  
  124. GivePlayerMoney(playerid, -13000);
  125. }
  126. }
  127. }
  128. return 1;
  129. }
  130.  
  131. public TempConsCar(playerid)
  132. {
  133. if(SelecCarm[playerid] == 1)
  134. {
  135. new sendername[MAX_PLAYERS], string[150];
  136. GetPlayerName(playerid, sendername, sizeof(sendername));
  137.  
  138. format(string, sizeof(string), "[Concessionária de motos INFO] Atenção senhor %s ,Sua moto está pronto , venha ate a nossa loja buscá lo!", sendername);
  139. SendClientMessage(playerid,0x6666ccFF,string);
  140.  
  141. CreateVehicle(522, -1669.3892, 1216.7321, 6.8210,247.3417, 6, 6, 60000);//os dois 6 , 6 sao as cores
  142.  
  143. Comprando[playerid] = 0;
  144. }
  145. if(SelecCarm[playerid] == 2)
  146. {
  147. new sendername[MAX_PLAYERS], string[150];
  148. GetPlayerName(playerid, sendername, sizeof(sendername));
  149.  
  150. format(string, sizeof(string), "[Concessionária de motos INFO] Atenção senhor %s ,Sua moto está pronto , venha ate a nossa loja buscá lo!", sendername);
  151. SendClientMessage(playerid,0x6666ccFF,string);
  152.  
  153. CreateVehicle(521, -1669.3892, 1216.7321, 6.8210,247.3417, 6, 6, 60000); //os dois 6 , 6 sao as cores
  154.  
  155. Comprando[playerid] = 0;
  156. }
  157. if(SelecCarm[playerid] == 2)
  158. {
  159. new sendername[MAX_PLAYERS], string[150];
  160. GetPlayerName(playerid, sendername, sizeof(sendername));
  161.  
  162. format(string, sizeof(string), "[Concessionária de motos INFO] Atenção senhor %s ,Sua moto está pronto , venha ate a nossa loja buscá lo!", sendername);
  163. SendClientMessage(playerid,0x6666ccFF,string);
  164.  
  165. CreateVehicle(461, -1669.3892, 1216.7321, 6.8210,247.3417, 6, 6, 60000); //os dois 6 , 6 sao as cores
  166.  
  167. Comprando[playerid] = 0;
  168. }
  169. return 1;
  170. }
  171.  
  172. /*=========================================
  173. || NÃO RETIRE OS CREDITOS!!! ||
  174. || LOWLY BRAZILIAN ||
  175. || (Y) ||
  176. ==========================================*/
Advertisement
Add Comment
Please, Sign In to add comment