Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 6.45 KB | None | 0 0
  1. // This is a comment
  2. // uncomment the line below if you want to write a filterscript
  3. //#define FILTERSCRIPT
  4.  
  5. #include <a_samp>
  6. #include <z_cmd>
  7. #include <sscanf2>
  8.  
  9. //Dialogs
  10. #define DIALOGO_PRIMEIRO 1
  11. #define DIALOG_LOGIN 2
  12. #define DIALOG_BUYWEAPON 3
  13.  
  14. main()
  15. {
  16.     print("\n----------------------------------");
  17.     print(" Blank Gamemode by Dudut");
  18.     print("----------------------------------\n");
  19. }
  20.  
  21. //variaveis globais
  22.  
  23.  
  24.  
  25. forward esperarKick(playerid);
  26. forward farmar(playerid);
  27. new float:BuyWeaponX = 1948.8822, float: BuyWeaponY = 1363.6421, float:BuyWeaponZ = 9.1094;
  28.  
  29.     spawn(playerid){
  30.     SetSpawnInfo(playerid, 0, 0,1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0);
  31.     SpawnPlayer(playerid);
  32.     return 1;
  33. }
  34.  
  35. public OnGameModeInit()
  36. {
  37.     AddStaticPickup(1239, 1, BuyWeaponX, BuyWeaponY, BuyWeaponZ, 0);
  38.     // Don't use these lines if it's a filterscript
  39.     SetGameModeText("Blank Script");
  40.     return 1;
  41. }
  42.  
  43. public OnGameModeExit()
  44. {
  45.     return 1;
  46. }
  47.  
  48.  
  49. public OnPlayerRequestClass(playerid, classid)
  50. {  
  51.  
  52.     return 0;
  53. }
  54.  
  55. public OnPlayerConnect(playerid)
  56. {
  57.     /*SetPlayerPos(playerid, 2105.1279,1317.8900,48.5256);
  58.     SetPlayerCameraPos(playerid, 2105.1279,1317.8900,48.5256);
  59.     SetPlayerCameraLookAt(playerid, 2105.1279,1317.8900,48.5256);*/
  60.  
  61.     SendClientMessage(playerid, -1, "Carregando... Aguarde.");
  62.  
  63.     SetPlayerPos(playerid, 1986.5243,1417.5510,9.1094);
  64.     SetPlayerCameraPos(playerid, 1986.8789,1413.7490,9.1094);
  65.     SetCameraBehindPlayer(playerid);
  66.     new name[29];
  67.     GetPlayerName(playerid, name, sizeof(name));
  68.     if (!strcmp(name, "Dudut", 0)){ // Se elas forem iguais retorna 0
  69.     ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "Digite sua senha:", "Confirmar", "Sair");
  70.     }
  71.     else{
  72.     SendClientMessage(playerid, -1, "Essa conta não está registrada");
  73.     SetTimer("esperarKick", 200, false);
  74.    
  75. }
  76.     return 1;
  77. }
  78.  
  79. public esperarKick(playerid){
  80. Kick(playerid);
  81. }
  82. public OnPlayerDisconnect(playerid, reason)
  83. {
  84.     return 1;
  85. }
  86.  
  87. public OnPlayerSpawn(playerid)
  88. {
  89.    
  90.     SendClientMessage(playerid, 0xFFFFFFFF, "Spawnado");
  91.     return 1;
  92. }
  93.  
  94. public OnPlayerDeath(playerid, killerid, reason)
  95. {
  96.     return 1;
  97. }
  98.  
  99. public OnVehicleSpawn(vehicleid)
  100. {
  101.     return 1;
  102. }
  103.  
  104. public OnVehicleDeath(vehicleid, killerid)
  105. {
  106.     return 1;
  107. }
  108.  
  109. public OnPlayerText(playerid, text[])
  110. {
  111.     return 1;
  112. }
  113.  
  114. public OnPlayerCommandText(playerid, cmdtext[])
  115. {
  116.    
  117.     return 0;
  118. }
  119.  
  120. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  121. {
  122.     return 1;
  123. }
  124.  
  125. public OnPlayerExitVehicle(playerid, vehicleid)
  126. {
  127.     return 1;
  128. }
  129.  
  130. public OnPlayerStateChange(playerid, newstate, oldstate)
  131. {
  132.     return 1;
  133. }
  134.  
  135. public OnPlayerEnterCheckpoint(playerid)
  136. {
  137.     return 1;
  138. }
  139.  
  140. public OnPlayerLeaveCheckpoint(playerid)
  141. {
  142.     return 1;
  143. }
  144.  
  145. public OnPlayerEnterRaceCheckpoint(playerid)
  146. {
  147.     return 1;
  148. }
  149.  
  150. public OnPlayerLeaveRaceCheckpoint(playerid)
  151. {
  152.     return 1;
  153. }
  154.  
  155. public OnRconCommand(cmd[])
  156. {
  157.     return 1;
  158. }
  159.  
  160. public OnPlayerRequestSpawn(playerid)
  161. {
  162.     return 1;
  163. }
  164.  
  165. public OnObjectMoved(objectid)
  166. {
  167.     return 1;
  168. }
  169.  
  170. public OnPlayerObjectMoved(playerid, objectid)
  171. {
  172.     return 1;
  173. }
  174.  
  175. public OnPlayerPickUpPickup(playerid, pickupid)
  176. {
  177.     return 1;
  178. }
  179.  
  180. public OnVehicleMod(playerid, vehicleid, componentid)
  181. {
  182.     return 1;
  183. }
  184.  
  185. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  186. {
  187.     return 1;
  188. }
  189.  
  190. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  191. {
  192.     return 1;
  193. }
  194.  
  195. public OnPlayerSelectedMenuRow(playerid, row)
  196. {
  197.     return 1;
  198. }
  199.  
  200. public OnPlayerExitedMenu(playerid)
  201. {
  202.     return 1;
  203. }
  204.  
  205. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  206. {
  207.     return 1;
  208. }
  209.  
  210. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  211. {
  212.     return 1;
  213. }
  214.  
  215. public OnRconLoginAttempt(ip[], password[], success)
  216. {
  217.     return 1;
  218. }
  219.  
  220. public OnPlayerUpdate(playerid)
  221. {
  222.     return 1;
  223. }
  224.  
  225. public OnPlayerStreamIn(playerid, forplayerid)
  226. {
  227.     return 1;
  228. }
  229.  
  230. public OnPlayerStreamOut(playerid, forplayerid)
  231. {
  232.     return 1;
  233. }
  234.  
  235. public OnVehicleStreamIn(vehicleid, forplayerid)
  236. {
  237.     return 1;
  238. }
  239.  
  240. public OnVehicleStreamOut(vehicleid, forplayerid)
  241. {
  242.     return 1;
  243. }
  244.  
  245. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  246. {
  247.     if (dialogid == DIALOG_LOGIN){
  248.         if(response){
  249.             if (isnull(inputtext)){
  250.                 ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "Digite sua senha:", "Confirmar", "Sair");
  251.             }
  252.             else{
  253.             if (!strcmp(inputtext, "123", 0)){
  254.                 SendClientMessage(playerid, -1, "Você logou com sucesso.");
  255.                 spawn(playerid);
  256.             }
  257.             else{
  258.             ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "Digite sua senha:", "Confirmar", "Sair");
  259.             }
  260.             }
  261.         }
  262.         else{
  263.             Kick(playerid);
  264.         }
  265.         return 1;
  266.     }
  267.     if (dialogid == DIALOGO_PRIMEIRO){
  268.         if(response){
  269.             SendClientMessage(playerid, -1, "Eu que agradeço");
  270.         }
  271.         else{
  272.             SendClientMessage(playerid, -1, "Vai você.");
  273.         }
  274.         return 1;
  275.     }
  276.     if (dialogid == DIALOG_BUYWEAPON){
  277.         if (response){
  278.             switch(listitem){
  279.                 case 0: SendClientMessage(playerid, -1, "Desert");
  280.             }
  281.  
  282.         }
  283.         else{
  284.             SendClientMessage(playerid, -1, "Adeus, então...");
  285.         }
  286.         return 1;
  287.     }
  288.     return 0;
  289. }
  290.  
  291. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  292. {
  293.     return 1;
  294. }
  295.  
  296. CMD:createcar(playerid, params[]){
  297.     new id;
  298.     if(sscanf(params, "d", id)) return SendClientMessage(playerid, -1, "Use /createcar [id]");
  299.     new Float:x, Float:y, Float:z;
  300.     GetPlayerPos(playerid, x, y, z);
  301.     CreateVehicle(id, x+2, y, z, -1, 0, 0, -1, 0);
  302.     new string[128];
  303.     format(string, sizeof(string), "Veículo %d criado com sucesso.", id); // permite
  304.     SendClientMessage(playerid, -1, string);
  305.     return 1;
  306. }
  307. CMD:spawn(playerid, params[]){
  308.     spawn(playerid);
  309.     return 1;
  310. }
  311. CMD:dialog(playerid, params[]){
  312.  
  313.     ShowPlayerDialog(playerid, DIALOGO_PRIMEIRO, DIALOG_STYLE_MSGBOX, "Dialog", "Seje bem vindo ao servidor", "Obrigado", "Vai se foder");
  314. }
  315. CMD:buyweapon(playerid, params[]){
  316.     if(IsPlayerInRangeOfPoint(playerid, 1.2, BuyWeaponX, BuyWeaponY, BuyWeaponZ)){
  317.         SendClientMessage(playerid, -1, "Você está próximo ao ponto de venda");
  318.         ShowPlayerDialog(playerid, DIALOG_BUYWEAPON, DIALOG_STYLE_TABLIST_HEADERS, "Buy Weapon", "Arma\tMunição\tPreço Arma\nDesert\t100\t5000", "Comprar", "Cancelar");
  319.     }
  320.     else{
  321.         SendClientMessage(playerid, -1, "Você não está proximo a um ponto de venda");
  322. }
  323.     return 1;
  324. }
  325. CMD:farmar(playerid, params[]){
  326.     SetTimer("farmar", 10000, true);
  327.     return 1;
  328. }
  329. public farmar(playerid){
  330.     GivePlayerMoney(playerid, 10000);
  331. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement