SHARE
TWEET

DM/4FUN

a guest Apr 9th, 2012 429 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Usem e Abuse :]
  2.  
  3. // ~~~~~~~~~~~~~~~~| COMEÇANDO |~~~~~~~~~~~~~~~~
  4.  
  5. //INCLUDES
  6. #include <a_samp>
  7.  
  8. //NEWS
  9. new Text:Baixo;
  10.  
  11. //DEFINES
  12. #define Vermelho 0xFF230AFF
  13. #define Amarelo 0xEDED26FF
  14. #define Verde 0x1CD622FF
  15. #define Azul 0x0597F2FF
  16. #define Rosa 0xF000ECFF
  17. #define Laranja 0xFAAC02FF
  18. #define Roxo 0x9B02FAFF
  19. #define Branco 0xFFFFFFFF
  20. #define Cinza 0x6B6A67FF
  21. #define CorTele 0x05E3A4FF
  22.  
  23. //FORWARDS
  24. forward SpecM(playerid);
  25.  
  26. // ~~~~~~~~~~~~~~~~| MAIN |~~~~~~~~~~~~~~~~
  27.  
  28. main()
  29. {
  30.     print("\n----------------------------------");
  31.     print("Base GM");
  32.     print("----------------------------------\n");
  33. }
  34.  
  35. public OnGameModeInit()
  36. {
  37.     SetGameModeText("Base Dm/4Fun");
  38.     for(new skins = 1; skins < 299; skins++)//TODAS SKIN DO SA-MP
  39.     {
  40.         AddPlayerClass(skins,1958.3783,1343.1572,15.3746,270.1425,24,100000,26,100000,32,100000); //MUDE AS CORDENAS PARA SUA PREFERENCIA
  41.     }
  42.     //OBJETOS
  43.     //DRAG DA MORTE
  44.     AddStaticVehicleEx(522,44.27782059,3055.70849609,24.93441200,86.00000000,16,1,15);
  45.     AddStaticVehicleEx(522,44.56273270,3058.69970703,24.93441200,85.99548340,2,1,15);
  46.     AddStaticVehicleEx(522,44.71268082,3064.82592773,24.93441200,85.99548340,6,1,15);
  47.     AddStaticVehicleEx(522,44.64665604,3061.38281250,24.93441200,85.99548340,3,1,15);
  48.     AddStaticVehicleEx(522,44.89160156,3067.94433594,24.93441200,85.99548340,-1,1,15);
  49.     AddStaticVehicleEx(522,45.11065674,3070.87011719,24.93441200,85.99548340,1,1,15);
  50.     AddStaticVehicleEx(522,44.99685287,3073.88476562,24.93441200,85.99548340,85,1,15);
  51.     AddStaticVehicleEx(411,11.93315887,3051.63183594,25.10777473,0.00000000,1,1,15);
  52.     AddStaticVehicleEx(411,17.91270065,3051.32373047,25.07403374,0.00000000,2,1,15);
  53.     AddStaticVehicleEx(411,24.54581642,3051.24487305,25.07403374,0.00000000,-1,-1,15);
  54.     AddStaticVehicleEx(411,30.70973587,3051.18481445,25.07403374,0.00000000,-1,1,15);
  55.     AddStaticVehicleEx(411,37.23207092,3050.75585938,25.07403374,0.00000000,115,1,15);
  56.     AddStaticVehicleEx(411,5.37945843,3051.82250977,25.07403374,0.00000000,85,1,15);
  57.     AddStaticVehicleEx(411,-1.01855469,3052.05468750,25.07403374,0.00000000,86,1,15);
  58.     AddStaticVehicleEx(411,-7.49804688,3052.49218750,25.07403374,0.00000000,6,1,15);
  59.     CreateObject(5147,-109.10321045,3070.09594727,34.14023209,0.00000000,0.00000000,358.00000000);
  60.     CreateObject(5147,-332.61477661,3077.89111328,34.04950714,0.00000000,0.00000000,177.99499512);
  61.     CreateObject(5297,-463.89257812,3082.43164062,30.00524712,0.00000000,0.00000000,177.99499512);
  62.     CreateObject(8040,7.84570312,3066.41699219,25.03965950,0.00000000,0.00000000,177.99499512);
  63.     CreateObject(1655,-515.39941406,3088.50390625,35.73102951,7.99804688,0.00000000,85.99548340);
  64.     CreateObject(1655,-516.02636719,3080.98925781,35.70161438,7.99255371,0.00000000,85.99548340);
  65.     CreateObject(792,25.66711998,3065.57446289,24.44590950,0.00000000,0.00000000,0.00000000);
  66.     CreateObject(792,19.05048752,3066.17504883,24.44590950,0.00000000,0.00000000,0.00000000);
  67.     CreateObject(792,12.05343723,3066.20361328,24.44590950,0.00000000,0.00000000,0.00000000);
  68.     CreateObject(792,4.73000479,3066.41821289,24.44590950,0.00000000,0.00000000,0.00000000);
  69.     CreateObject(792,-9.78918552,3066.73632812,24.44590950,0.00000000,0.00000000,0.00000000);
  70.     CreateObject(792,-2.59147215,3066.45947266,24.44590950,0.00000000,0.00000000,0.00000000);
  71.     CreateObject(3506,-5.29214382,3066.33227539,24.19590950,0.00000000,0.00000000,0.00000000);
  72.     CreateObject(3506,1.20226526,3066.23681641,24.44590950,0.00000000,0.00000000,0.00000000);
  73.     CreateObject(3506,9.44432354,3066.13305664,24.44590950,0.00000000,0.00000000,0.00000000);
  74.     CreateObject(3506,15.51919556,3066.29125977,24.44590950,0.00000000,0.00000000,0.00000000);
  75.     CreateObject(3506,22.23913193,3065.63647461,24.44590950,0.00000000,0.00000000,0.00000000);
  76.     CreateObject(1583,-31.02725983,3076.07641602,25.96166611,0.00000000,0.00000000,86.00000000);
  77.     CreateObject(1584,-30.96490097,3058.67065430,26.06430244,0.00000000,0.00000000,266.00000000);
  78.     CreateObject(1597,-29.99482727,3080.69580078,26.93141556,0.00000000,0.00000000,358.00000000);
  79.     CreateObject(1597,-31.70486832,3053.88134766,26.93141556,0.00000000,0.00000000,357.99499512);
  80.     CreateObject(3434,-105.06059265,3069.39575195,59.56906891,0.00000000,0.00000000,82.00000000);
  81.     CreateObject(3092,-241.23805237,3075.27905273,35.96473312,0.00000000,270.00000000,21.99975586);
  82.     CreateObject(1559,-518.68530273,3085.05078125,39.21833420,0.00000000,0.00000000,0.00000000);
  83.     CreateObject(7073,9.93693256,3082.41552734,42.54078674,0.00000000,0.00000000,268.00000000);
  84.     CreateObject(7392,26.60207558,3080.76684570,32.24411011,0.00000000,0.00000000,88.00000000);
  85.     CreateObject(7392,-3.72801352,3082.46484375,32.29080963,0.00000000,0.00000000,265.99645996);
  86.     //AEROPORTO ABANDONADO
  87.     AddStaticVehicleEx(511,415.10000610,2502.50000000,18.60000038,90.00000000,1,-1,15); //Beagle
  88.     AddStaticVehicleEx(476,203.30000305,2542.50000000,18.70000076,90.00000000,16,-1,15); //Rustler
  89.     AddStaticVehicleEx(513,243.39999390,2542.19995117,17.89999962,181.99993896,17,1,15); //Stunt
  90.     AddStaticVehicleEx(513,268.39999390,2542.89990234,17.89999962,181.99951172,65,-1,15); //Stunt
  91.     AddStaticVehicleEx(520,325.20001221,2541.60009766,18.00000000,179.99993896,-1,-1,15); //Hydra
  92.     AddStaticVehicleEx(520,290.10000610,2540.89990234,18.00000000,179.99450684,-1,-1,15); //Hydra
  93.     AddStaticVehicleEx(425,348.60000610,2539.39990234,17.89999962,181.99993896,-1,-1,15); //Hunter
  94.     AddStaticVehicleEx(447,366.10000610,2538.00000000,17.20000076,179.99963379,-1,-1,15); //Seasparrow
  95.     AddStaticVehicleEx(487,382.39999390,2538.19995117,17.29999924,181.99993896,-1,-1,15); //Maverick
  96.     AddStaticVehicleEx(522,415.70001221,2519.69995117,16.70000076,90.00000000,-1,-1,15); //NRG-500
  97.     CreateObject(8357,327.29998779,2502.19995117,16.10000038,0.00000000,0.00000000,270.00000000); //object(vgssairportland14) (4)
  98.     CreateObject(8357,125.80000305,2502.19995117,16.10000038,0.00000000,0.00000000,269.99499512); //object(vgssairportland14) (5)
  99.     CreateObject(8251,420.79998779,2502.19995117,20.00000000,0.00000000,0.00000000,180.00000000); //object(pltschlhnger02_lvs) (1)
  100.     CreateObject(987,422.10000610,2481.80004883,15.50000000,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (1)
  101.     CreateObject(987,433.89999390,2481.60009766,15.50000000,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (2)
  102.     CreateObject(987,410.79998779,2482.10009766,15.50000000,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (3)
  103.     CreateObject(987,399.20001221,2482.00000000,15.50000000,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (4)
  104.     CreateObject(987,387.89999390,2482.10009766,15.50000000,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (5)
  105.     CreateObject(987,375.79998779,2481.69995117,15.50000000,0.00000000,0.00000000,2.00000000); //object(elecfence_bar) (6)
  106.     CreateObject(987,363.79998779,2481.80004883,15.50000000,0.00000000,0.00000000,359.99951172); //object(elecfence_bar) (7)
  107.     CreateObject(987,352.00000000,2481.69995117,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (8)
  108.     CreateObject(987,340.10000610,2481.89990234,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (9)
  109.     CreateObject(987,328.20001221,2481.89990234,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (10)
  110.     CreateObject(987,316.39999390,2481.80004883,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (11)
  111.     CreateObject(987,305.00000000,2481.80004883,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (12)
  112.     CreateObject(987,293.29998779,2481.89990234,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (13)
  113.     CreateObject(987,281.70001221,2481.89990234,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (14)
  114.     CreateObject(987,270.50000000,2482.10009766,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (15)
  115.     CreateObject(987,258.89999390,2482.00000000,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (16)
  116.     CreateObject(987,249.60000610,2481.89990234,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (17)
  117.     CreateObject(987,237.80000305,2482.00000000,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (18)
  118.     CreateObject(987,226.00000000,2481.89990234,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (19)
  119.     CreateObject(987,214.80000305,2482.10009766,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (20)
  120.     CreateObject(987,202.89999390,2482.00000000,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (21)
  121.     CreateObject(987,191.00000000,2482.19995117,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (22)
  122.     CreateObject(987,179.19999695,2482.30004883,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (23)
  123.     CreateObject(987,167.39999390,2482.30004883,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (24)
  124.     CreateObject(987,155.50000000,2482.19995117,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (25)
  125.     CreateObject(987,144.00000000,2482.39990234,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (26)
  126.     CreateObject(987,132.00000000,2482.19995117,15.60000038,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (27)
  127.     CreateObject(987,120.09999847,2482.30004883,15.60000038,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (28)
  128.     CreateObject(987,107.80000305,2482.10009766,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (29)
  129.     CreateObject(987,96.00000000,2482.10009766,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (30)
  130.     CreateObject(987,84.30000305,2482.19995117,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (31)
  131.     CreateObject(987,71.90000153,2482.19995117,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (32)
  132.     CreateObject(987,60.90000153,2482.19995117,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (33)
  133.     CreateObject(987,49.20000076,2482.10009766,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (35)
  134.     CreateObject(987,37.59999847,2482.00000000,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (36)
  135.     CreateObject(987,28.50000000,2482.00000000,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (37)
  136.     CreateObject(987,20.50000000,2481.89990234,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (38)
  137.     CreateObject(8357,126.50000000,2542.00000000,16.20000076,0.00000000,0.00000000,269.99450684); //object(vgssairportland14) (6)
  138.     CreateObject(8357,336.20001221,2542.00000000,16.10000038,0.00000000,0.00000000,269.99450684); //object(vgssairportland14) (7)
  139.     CreateObject(8251,209.50000000,2542.10009766,20.10000038,0.00000000,0.00000000,179.99450684); //object(pltschlhnger02_lvs) (2)
  140.     CreateObject(8357,-2.79999995,2502.19995117,16.00000000,0.00000000,0.00000000,269.99450684); //object(vgssairportland14) (8)
  141.     CreateObject(8357,-13.10000038,2542.00000000,15.80000019,0.00000000,0.00000000,269.99450684); //object(vgssairportland14) (9)
  142.     CreateObject(987,8.89999962,2481.89990234,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (41)
  143.     CreateObject(987,-2.40000010,2481.80004883,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (42)
  144.     CreateObject(987,-11.00000000,2482.00000000,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (43)
  145.     CreateObject(987,-19.60000038,2482.00000000,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (44)
  146.     CreateObject(987,-28.89999962,2481.89990234,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (45)
  147.     CreateObject(987,-40.40000153,2482.00000000,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (46)
  148.     CreateObject(987,-50.40000153,2482.00000000,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (47)
  149.     CreateObject(987,-61.20000076,2481.89990234,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (48)
  150.     CreateObject(987,-72.90000153,2482.00000000,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (49)
  151.     CreateObject(987,-83.59999847,2482.00000000,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (50)
  152.     CreateObject(987,-93.50000000,2482.00000000,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (51)
  153.     CreateObject(987,-105.09999847,2482.30004883,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (52)
  154.     CreateObject(987,-109.00000000,2482.50000000,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (54)
  155.     //TEXT DRAW
  156.     Baixo = TextDrawCreate(0.0,438.0," /CONTATO /COMANDOS /CREDITOS /TELES /PM - VISITE: FORUM.SA-MP.COM");
  157.     TextDrawColor(Baixo,0xFF8000FF);
  158.     TextDrawFont(Baixo,2);
  159.     TextDrawAlignment(Baixo,1);
  160.     TextDrawBackgroundColor(Baixo,0x00000000);
  161.     TextDrawLetterSize(Baixo,0.4,0.8);
  162.     TextDrawUseBox(Baixo,1);
  163.     TextDrawBoxColor(Baixo,0x00000044);
  164.     return 1;
  165. }
  166.  
  167. public OnGameModeExit()
  168. {
  169.     return 1;
  170. }
  171.  
  172. public OnPlayerRequestClass(playerid, classid)
  173. {
  174.     SetPlayerPos(playerid,1678.9169,1447.8788,47.7780);
  175.     SetPlayerFacingAngle(playerid,271.9625);
  176.     SetPlayerCameraPos(playerid,1682.4458,1448.0004,49.6016);
  177.     SetPlayerCameraLookAt(playerid,1678.9169,1447.8788,47.7780);
  178.     return 1;
  179. }
  180.  
  181. public OnPlayerConnect(playerid)
  182. {
  183.     SendClientMessage(playerid, Vermelho, "|=============================================================|");
  184.     SendClientMessage(playerid, Azul, "                  [INFO]: Esse GM/Servidor Foi Criado Por Lucas_HenryK");
  185.     SendClientMessage(playerid, Amarelo, "                       [AJUDA]: Para Ajuda Inciante Digite /COMANDOS");
  186.     SendClientMessage(playerid, Verde, "           [IMPORTANTE]: Siga As Regras Do Serivor Para Não Ser Banido!");
  187.     SendClientMessage(playerid, Vermelho, "|=============================================================|");
  188.     new str[256];
  189.     new NomeP[24];
  190.     TextDrawShowForPlayer(playerid, Baixo);
  191.     GetPlayerName(playerid,NomeP,MAX_PLAYER_NAME);
  192.     format(str, sizeof(str),"[SERVER]: --> %s [ID:%d] Entrou No Servidor!",NomeP,playerid);
  193.     SendClientMessageToAll(-1,str);
  194.     return 1;
  195. }
  196.  
  197. public OnPlayerDisconnect(playerid, reason)
  198. {
  199.     new str[256];
  200.     new NomeP[24];
  201.     TextDrawDestroy(Baixo);
  202.     GetPlayerName(playerid,NomeP,MAX_PLAYER_NAME);
  203.     format(str, sizeof(str),"[SERVER]: --> %s [ID:%d] Saiu Do Servidor!",NomeP,playerid);
  204.     SendClientMessageToAll(-1,str);
  205.     return 1;
  206. }
  207.  
  208. public OnPlayerSpawn(playerid)
  209. {
  210.     return 1;
  211. }
  212.  
  213. public OnPlayerDeath(playerid, killerid, reason)
  214. {
  215.     SetPlayerVirtualWorld(playerid,0);
  216.     TogglePlayerSpectating(playerid, true);
  217.     PlayerSpectatePlayer(playerid, killerid, 1);
  218.     GameTextForPlayer(playerid, "~y~Olha quem te matou~r~!!", 3000, 1);
  219.     SetTimerEx("SpecM", 5000, false, "d", playerid);
  220.     return 1;
  221. }
  222.  
  223. public SpecM(playerid)
  224. {
  225.      TogglePlayerSpectating(playerid, false);
  226.      return 1;
  227. }
  228.  
  229. public OnVehicleSpawn(vehicleid)
  230. {
  231.     return 1;
  232. }
  233.  
  234. public OnVehicleDeath(vehicleid, killerid)
  235. {
  236.     return 1;
  237. }
  238.  
  239. public OnPlayerText(playerid, text[])
  240. {
  241.     return 1;
  242. }
  243.  
  244. public OnPlayerCommandText(playerid, cmdtext[])
  245. {
  246.     // ~~~~~~~~~~~~~~~~~~| COMANDOS DE PLAYERS |~~~~~~~~~~~~~~~~~~
  247.     ///COMANDOS
  248.     if (strcmp("/comandos", cmdtext, true, 11) == 0)
  249.     {
  250.     new comandos[1000];
  251.     strins(comandos,"{02C0E6}/Teles - {EDED26}teleportes do server\n",strlen(comandos));
  252.     strins(comandos,"{02C0E6}/Creditos - {EDED26}criador do Gamemode\n",strlen(comandos));
  253.     strins(comandos,"{02C0E6}/Regras - {EDED26}regras do server\n",strlen(comandos));
  254.     strins(comandos,"{02C0E6}/Comandos - {EDED26}comandos do server\n",strlen(comandos));
  255.     strins(comandos,"{02C0E6}/PM - {EDED26}enviar mensagem privada\n",strlen(comandos));
  256.     strins(comandos,"{02C0E6}/Cores - {EDED26}cores para seu nick\n",strlen(comandos));
  257.     strins(comandos,"{02C0E6}/Kits - {EDED26}kits de armas para comprar\n",strlen(comandos));
  258.     strins(comandos,"{02C0E6}/Horas - {EDED26}ver as hrs (horario de brasilia)\n",strlen(comandos));
  259.     strins(comandos,"{02C0E6}/Contato - {EDED26}Meus contatos (Lucas_HenryK)\n",strlen(comandos));
  260.     strins(comandos,"{02C0E6}/Grana - {EDED26}você ganha R$1.500 de dinheiro\n",strlen(comandos));
  261.     ShowPlayerDialog(playerid,2, DIALOG_STYLE_MSGBOX, "{FFFFFF}Comandos de jogadores: ",comandos, "Ok", "Fechar");
  262.     return 1;
  263.     }
  264.     //TELEPORTES
  265.     if (strcmp("/teles", cmdtext, true, 22) == 0)
  266.     {
  267.     new teles[500];
  268.     strins(teles,"{02C0E6}/LV - {EDED26}Vai até las venturas\n",strlen(teles));
  269.     strins(teles,"{02C0E6}/SF - {EDED26}Vai até san fierro\n",strlen(teles));
  270.     strins(teles,"{02C0E6}/LV - {EDED26}Vai até los santost\n",strlen(teles));
  271.     strins(teles,"{02C0E6}/DRIFT - {EDED26}Pista de drift\n",strlen(teles));
  272.     strins(teles,"{02C0E6}/RDM - {EDED26}Rampa da Morte\n",strlen(teles));
  273.     strins(teles,"{02C0E6}/AEROAB - {EDED26}Aeroporto abandonado\n",strlen(teles));
  274.     ShowPlayerDialog(playerid,3, DIALOG_STYLE_MSGBOX, "{FFFFFF}Teleportes: ",teles, "Ok", "Fechar");
  275.     return 1;
  276.     }
  277.     //CONTATO
  278.     if (strcmp("/contato", cmdtext, true, 33) == 0)
  279.     {
  280.     new contato[500];
  281.     strins(contato,"{FFFFFF}MSN: {0597F2}lucash.8@hotmail.com\n",strlen(contato));
  282.     strins(contato,"{FFFFFF}SITE: {0597F2}forum.sa-mp.com\n{FFFFFF}USER: {0597F2}Lucas_HenryK\n",strlen(contato));
  283.     ShowPlayerDialog(playerid,8, DIALOG_STYLE_MSGBOX, "{FFFFFF}Contato: ",contato, "Ok", "Fechar");
  284.     return 1;
  285.     }
  286.     //CREDITOS
  287.     if (strcmp("/creditos", cmdtext, true, 44) == 0)
  288.     {
  289.     new creditos[500];
  290.     strins(creditos,"{FFFFFF}GameMode feito por - {1CD622}Lucas_HenryK, Com a ajuda\n",strlen(creditos));
  291.     strins(creditos,"{FFFFFF}de {1CD622}forum.sa-mp.com PT-BR e Synchro.\n",strlen(creditos));
  292.     ShowPlayerDialog(playerid,4, DIALOG_STYLE_MSGBOX, "{FFFFFF}Creditos: ",creditos, "Ok", "Fechar");
  293.     return 1;
  294.     }
  295.     //REGRAS
  296.     if (strcmp("/regras", cmdtext, true, 55) == 0)
  297.     {
  298.     new regras[500];
  299.     strins(regras,"{FF230A}EM DESENVOLVIMENTO!\n",strlen(regras));
  300.     ShowPlayerDialog(playerid,5, DIALOG_STYLE_MSGBOX, "{FFFFFF}Regras: ",regras, "Ok", "Fechar");
  301.     return 1;
  302.     }
  303.     //KITS
  304.     if (strcmp("/kits", cmdtext, true, 66) == 0)
  305.     {
  306.     new kits[500];
  307.     strins(kits,"{1CD622}[/KIT01] - {FFFFFF}Swan Off, Tec9, Gases e Taco de BaseBall. {EB3300}(CUSTO: R$5,000)\n",strlen(kits));
  308.     strins(kits,"{1CD622}[/KIT02] - {FFFFFF}Combat Shotgun, Mp5, Granadas, e Katana. {EB3300}(CUSTO: R$4,600)\n",strlen(kits));
  309.     strins(kits,"{1CD622}[/KIT03] - {FFFFFF}Shot Gun, Micro Uzi, Motolovs e Serra Eletrica. {EB3300}(CUSTO: R$3,800)\n",strlen(kits));
  310.     ShowPlayerDialog(playerid,7, DIALOG_STYLE_MSGBOX, "{FFFFFF}Kits Diponiveis: ",kits, "Ok", "Fechar");
  311.     return 1;
  312.     }
  313.     //KIT 01
  314.     if (strcmp("/kit01", cmdtext, true, 77) == 0)
  315.     {
  316.     if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid, Vermelho, "[ERRO]: Você não tem grana suficiente!");
  317.     ResetPlayerWeapons(playerid);
  318.     GivePlayerWeapon(playerid,26,1000);
  319.     GivePlayerWeapon(playerid,32,1000);
  320.     GivePlayerWeapon(playerid,17,1000);
  321.     GivePlayerWeapon(playerid,5,1000);
  322.     GivePlayerMoney(playerid, -5000);
  323.     SendClientMessage(playerid, Amarelo, "[INFO]: Kit adquirido com sucesso!!");
  324.     return 1;
  325.     }
  326.     //KIT 01
  327.     if (strcmp("/kit02", cmdtext, true, 88) == 0)
  328.     {
  329.     if(GetPlayerMoney(playerid) < 4600) return SendClientMessage(playerid, Vermelho, "[ERRO]: Você não tem grana suficiente!");
  330.     ResetPlayerWeapons(playerid);
  331.     GivePlayerWeapon(playerid,27,1000);
  332.     GivePlayerWeapon(playerid,29,1000);
  333.     GivePlayerWeapon(playerid,16,1000);
  334.     GivePlayerWeapon(playerid,9,1000);
  335.     SendClientMessage(playerid, Amarelo, "[INFO]: Kit adquirido com sucesso!!");
  336.     return 1;
  337.     }
  338.     //KIT 03
  339.     if (strcmp("/kit03", cmdtext, true, 99) == 0)
  340.     {
  341.     if(GetPlayerMoney(playerid) < 3800) return SendClientMessage(playerid, Vermelho, "[ERRO]: Você não tem grana suficiente!");
  342.     ResetPlayerWeapons(playerid);
  343.     GivePlayerWeapon(playerid,25,1000);
  344.     GivePlayerWeapon(playerid,28,1000);
  345.     GivePlayerWeapon(playerid,18,1000);
  346.     GivePlayerWeapon(playerid,8,1000);
  347.     SendClientMessage(playerid, Amarelo, "[INFO]: Kit adquirido com sucesso!!");
  348.     return 1;
  349.     }
  350.     //CORES PARA NICK
  351.     if (strcmp("/cores", cmdtext, true, 111) == 0)
  352.     {
  353.     new cores[500];
  354.     strins(cores,"{FF230A}/Vermelho {EDED26}/Armarelo {1CD622}/Verde {0597F2}/Azul\n{F000EC}/Rosa {FAAC02}/Laranja {9B02FA}/Roxo {FFFFFF}/Branco {6B6A67}/Cinza\n",strlen(cores));
  355.     ShowPlayerDialog(playerid,6, DIALOG_STYLE_MSGBOX, "{FFFFFF}Cores Diponiveis: ",cores, "Ok", "Fechar");
  356.     return 1;
  357.     }
  358.     //COR VERMELHA
  359.     if (strcmp("/vermelho", cmdtext, true, 222) == 0)
  360.     {
  361.     SetPlayerColor(playerid,0xFF230AFF);
  362.     return 1;
  363.     }
  364.     //COR AMARELA
  365.     if (strcmp("/amarelo", cmdtext, true, 333) == 0)
  366.     {
  367.     SetPlayerColor(playerid,0xEDED26FF);
  368.     return 1;
  369.     }
  370.     //COR VERDE
  371.     if (strcmp("/verde", cmdtext, true, 444) == 0)
  372.     {
  373.     SetPlayerColor(playerid,0x1CD622FF);
  374.     return 1;
  375.     }
  376.     //COR AZUL
  377.     if (strcmp("/azul", cmdtext, true, 555) == 0)
  378.     {
  379.     SetPlayerColor(playerid,0x0597F2FF);
  380.     return 1;
  381.     }
  382.     //COR ROSA
  383.     if (strcmp("/rosa", cmdtext, true, 666) == 0)
  384.     {
  385.     SetPlayerColor(playerid,0xF000ECFF);
  386.     return 1;
  387.     }
  388.     //COR LARANJA
  389.     if (strcmp("/laranja", cmdtext, true, 777) == 0)
  390.     {
  391.     SetPlayerColor(playerid,0xFAAC02FF);
  392.     return 1;
  393.     }
  394.     //COR ROXO
  395.     if (strcmp("/roxo", cmdtext, true, 888) == 0)
  396.     {
  397.     SetPlayerColor(playerid,0x9B02FAFF);
  398.     return 1;
  399.     }
  400.     //COR BRANCO
  401.     if (strcmp("/branco", cmdtext, true, 999) == 0)
  402.     {
  403.     SetPlayerColor(playerid,0xFFFFFFFF);
  404.     return 1;
  405.     }
  406.     //COR CINZA
  407.     if (strcmp("/cinza", cmdtext, true, 987) == 0)
  408.     {
  409.     SetPlayerColor(playerid,0x6B6A67FF);
  410.     return 1;
  411.     }
  412.     //HORAS
  413.     if (strcmp("/horas", cmdtext, true, 654) == 0)
  414.     {
  415.     new string[64], hour,minuite,second; gettime(hour,minuite,second);
  416.     format(string, sizeof(string), "~g~|~w~%d:%d~g~|", hour, minuite);
  417.     return GameTextForPlayer(playerid, string, 6000, 3);
  418.     }
  419.     //GRANA
  420.     if (strcmp("/grana", cmdtext, true, 321) == 0)
  421.     {
  422.     GivePlayerMoney(playerid,1500);
  423.     SendClientMessage(playerid, Verde, "[INFO]: Você ganho R$1.500!");
  424.     return 1;
  425.     }
  426.     //LOS SANTOS
  427.     if (strcmp("/ls", cmdtext, true, 123) == 0)
  428.     {
  429.     new NomeP[MAX_PLAYER_NAME];
  430.     new string[256];
  431.     SetPlayerInterior(playerid,0);
  432.     GetPlayerName(playerid,NomeP,MAX_PLAYER_NAME);
  433.     format(string, sizeof(string),"%s foi para los santos (/LS)",NomeP);
  434.     SendClientMessageToAll(CorTele,string);
  435.     if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER){
  436.     SetVehiclePos(GetPlayerVehicleID(playerid),1535.0038,-1672.3691,18.0423);
  437.     PutPlayerInVehicle(playerid,GetPlayerVehicleID(playerid),0);
  438.     SetVehicleZAngle(GetPlayerVehicleID(playerid),89.5350);
  439.     return 1;
  440.     }
  441.     SetPlayerPos(playerid,1535.0038,-1672.3691,13.0423);
  442.     return 1;
  443.     }
  444.     //LAS VENTURAS
  445.     if (strcmp("/lv", cmdtext, true, 456) == 0)
  446.     {
  447.     new NomeP[MAX_PLAYER_NAME];
  448.     new string[256];
  449.     SetPlayerInterior(playerid,0);
  450.     GetPlayerName(playerid,NomeP,MAX_PLAYER_NAME);
  451.     format(string, sizeof(string),"%s foi para las venturas (/LV)",NomeP);
  452.     SendClientMessageToAll(CorTele,string);
  453.     if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER){
  454.     SetVehiclePos(GetPlayerVehicleID(playerid),2137.3298,2149.6741,10.3303);
  455.     PutPlayerInVehicle(playerid,GetPlayerVehicleID(playerid),0);
  456.     SetVehicleZAngle(GetPlayerVehicleID(playerid),147.1717);
  457.     return 1;
  458.     }
  459.     SetPlayerPos(playerid,2137.3298,2149.6741,10.3303);
  460.     return 1;
  461.     }
  462.     //SAN FIERRO
  463.     if (strcmp("/sf", cmdtext, true, 689) == 0)
  464.     {
  465.     new NomeP[MAX_PLAYER_NAME];
  466.     new string[256];
  467.     SetPlayerInterior(playerid,0);
  468.     GetPlayerName(playerid,NomeP,MAX_PLAYER_NAME);
  469.     format(string, sizeof(string),"%s foi para san fierro (/SF)",NomeP);
  470.     SendClientMessageToAll(CorTele,string);
  471.     if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER){
  472.     SetVehiclePos(GetPlayerVehicleID(playerid),-1990.6663,286.7029,38.7145);
  473.     PutPlayerInVehicle(playerid,GetPlayerVehicleID(playerid),0);
  474.     SetVehicleZAngle(GetPlayerVehicleID(playerid),92.1285);
  475.     return 1;
  476.     }
  477.     SetPlayerPos(playerid,-1990.6663,286.7029,38.7145);
  478.     return 1;
  479.     }
  480.     //DRIFT
  481.     if (strcmp("/drift", cmdtext, true, 852) == 0)
  482.     {
  483.     new NomeP[MAX_PLAYER_NAME];
  484.     new string[256];
  485.     SetPlayerInterior(playerid,0);
  486.     GetPlayerName(playerid,NomeP,MAX_PLAYER_NAME);
  487.     format(string, sizeof(string),"%s foi para pista de drift (/DRIFT)",NomeP);
  488.     SendClientMessageToAll(CorTele,string);
  489.     if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER){
  490.     SetVehiclePos(GetPlayerVehicleID(playerid),-333.5709,1526.9032,80.3594);
  491.     PutPlayerInVehicle(playerid,GetPlayerVehicleID(playerid),0);
  492.     SetVehicleZAngle(GetPlayerVehicleID(playerid),259.0366);
  493.     return 1;
  494.     }
  495.     SetPlayerPos(playerid,-333.5709,1526.9032,75.3594);
  496.     return 1;
  497.     }
  498.     //RAMPA DA MORTE
  499.     if (strcmp("/rdm", cmdtext, true, 258) == 0)
  500.     {
  501.     SetPlayerPos(playerid,33.7602,3065.8135,25.2740);
  502.     SetVehiclePos(playerid,33.7602,3065.8135,25.2740);
  503.     new NameP[MAX_PLAYER_NAME];
  504.     new string[256];
  505.     GetPlayerName(playerid, NameP, MAX_PLAYER_NAME);
  506.     format(string, sizeof(string), "%s foi para rampa da morte -> (/RDM)", NameP);
  507.     SendClientMessageToAll(CorTele,string);
  508.     return 1;
  509.     }
  510.     //AERO AB
  511.     if (strcmp("/aeroab", cmdtext, true, 357) == 0)
  512.     {
  513.     SetPlayerPos(playerid,419.2701,2524.7063,17.0844);
  514.     SetVehiclePos(playerid,419.2701,2524.7063,17.0844);
  515.     new NameP[MAX_PLAYER_NAME];
  516.     new string[256];
  517.     GetPlayerName(playerid, NameP, MAX_PLAYER_NAME);
  518.     format(string, sizeof(string), "%s foi para aero abandonado -> (/AEROAB)", NameP);
  519.     SendClientMessageToAll(CorTele,string);
  520.     return 1;
  521.     }
  522.     //SE MATAR
  523.     if (strcmp("/kill", cmdtext, true, 753) == 0)
  524.     {
  525.     SetPlayerHealth(playerid, 0);
  526.     new NameP[MAX_PLAYER_NAME];
  527.     new string[256];
  528.     GetPlayerName(playerid, NameP, MAX_PLAYER_NAME);
  529.     format(string, sizeof(string), "%s se matou -> (/KILL)", NameP);
  530.     SendClientMessageToAll(CorTele,string);
  531.     return 1;
  532.     }
  533.     //MENSAGEM PRIVADA
  534.     new cmd[156], tmp[156], idx;
  535.     cmd = strtok(cmdtext, idx);
  536.     if (strcmp("/pm", cmdtext, true, 951) == 0)
  537.     {
  538.     tmp = strtok(cmdtext, idx);
  539.     if(!strlen(tmp)) return SendClientMessage(playerid,Vermelho, "[ERRO]: /pm [id] [mensagem]");
  540.     new giveplayerid, msg[128];
  541.     giveplayerid = ReturnUser(tmp);
  542.     if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid,-1, "Jogador não conectado");
  543.     if(playerid == giveplayerid) return SendClientMessage(playerid,Vermelho, "[ERRO]: Ain que burro, voce não pode mandar mensagem pra você mesmo ");
  544.     new length = strlen(cmdtext);
  545.     while ((idx < length) && (cmdtext[idx] <= ' '))
  546.     {
  547.     idx++;
  548.     }
  549.     new offset = idx;
  550.     new result[64];
  551.     while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  552.     {
  553.     result[idx - offset] = cmdtext[idx];
  554.     idx++;
  555.     }
  556.     result[idx - offset] = EOS;
  557.     if(!strlen(result)) return SendClientMessage(playerid,Vermelho, "[ERRO]: Digite uma mensagem !");
  558.     new nomeplayerid[MAX_PLAYER_NAME], nomegiveplayerid[MAX_PLAYER_NAME];
  559.     GetPlayerName(playerid, nomeplayerid, sizeof(nomeplayerid));
  560.     GetPlayerName(giveplayerid, nomegiveplayerid, sizeof(nomegiveplayerid));
  561.     format(msg,sizeof(msg),"[MP] de %s: %s", nomeplayerid,result);
  562.     GameTextForPlayer(giveplayerid, "~g~NOVA MP RECEBIDA.", 2000, 1);
  563.     SendClientMessage(giveplayerid, 0xE6E612FF, msg);
  564.     format(msg,sizeof(msg),"[MP] para %s: %s",nomegiveplayerid,result);
  565.     GameTextForPlayer(playerid, "~g~MP ENVIADA", 2000, 1);
  566.     SendClientMessage(playerid,0xE0E000FF, msg);
  567.     return 1;
  568.     }
  569.     return 0;
  570. }
  571.  
  572. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  573. {
  574.     return 1;
  575. }
  576.  
  577. public OnPlayerExitVehicle(playerid, vehicleid)
  578. {
  579.     return 1;
  580. }
  581.  
  582. public OnPlayerStateChange(playerid, newstate, oldstate)
  583. {
  584.     return 1;
  585. }
  586.  
  587. public OnPlayerEnterCheckpoint(playerid)
  588. {
  589.     return 1;
  590. }
  591.  
  592. public OnPlayerLeaveCheckpoint(playerid)
  593. {
  594.     return 1;
  595. }
  596.  
  597. public OnPlayerEnterRaceCheckpoint(playerid)
  598. {
  599.     return 1;
  600. }
  601.  
  602. public OnPlayerLeaveRaceCheckpoint(playerid)
  603. {
  604.     return 1;
  605. }
  606.  
  607. public OnRconCommand(cmd[])
  608. {
  609.     return 1;
  610. }
  611.  
  612. public OnPlayerRequestSpawn(playerid)
  613. {
  614.     return 1;
  615. }
  616.  
  617. public OnObjectMoved(objectid)
  618. {
  619.     return 1;
  620. }
  621.  
  622. public OnPlayerObjectMoved(playerid, objectid)
  623. {
  624.     return 1;
  625. }
  626.  
  627. public OnPlayerPickUpPickup(playerid, pickupid)
  628. {
  629.     return 1;
  630. }
  631.  
  632. public OnVehicleMod(playerid, vehicleid, componentid)
  633. {
  634.     return 1;
  635. }
  636.  
  637. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  638. {
  639.     return 1;
  640. }
  641.  
  642. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  643. {
  644.     return 1;
  645. }
  646.  
  647. public OnPlayerSelectedMenuRow(playerid, row)
  648. {
  649.     return 1;
  650. }
  651.  
  652. public OnPlayerExitedMenu(playerid)
  653. {
  654.     return 1;
  655. }
  656.  
  657. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  658. {
  659.     return 1;
  660. }
  661.  
  662. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  663. {
  664.     return 1;
  665. }
  666.  
  667. public OnRconLoginAttempt(ip[], password[], success)
  668. {
  669.     return 1;
  670. }
  671.  
  672. public OnPlayerUpdate(playerid)
  673. {
  674.     return 1;
  675. }
  676.  
  677. public OnPlayerStreamIn(playerid, forplayerid)
  678. {
  679.     return 1;
  680. }
  681.  
  682. public OnPlayerStreamOut(playerid, forplayerid)
  683. {
  684.     return 1;
  685. }
  686.  
  687. public OnVehicleStreamIn(vehicleid, forplayerid)
  688. {
  689.     return 1;
  690. }
  691.  
  692. public OnVehicleStreamOut(vehicleid, forplayerid)
  693. {
  694.     return 1;
  695. }
  696.  
  697. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  698. {
  699.     return 1;
  700. }
  701.  
  702. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  703. {
  704.     return 1;
  705. }
  706. stock strtok(const string[], &index)
  707. {
  708.     new length = strlen(string);
  709.     while ((index < length) && (string[index] <= ' '))
  710.     {
  711.         index++;
  712.     }
  713.  
  714.     new offset = index;
  715.     new result[20];
  716.     while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
  717.     {
  718.         result[index - offset] = string[index];
  719.         index++;
  720.     }
  721.     result[index - offset] = EOS;
  722.     return result;
  723. }
  724.  
  725.  
  726. stock ReturnUser(text[], playerid = INVALID_PLAYER_ID)
  727. {
  728.         new pos = 0;
  729.         while (text[pos] < 0x21)
  730.         {
  731.                 if (text[pos] == 0) return INVALID_PLAYER_ID;
  732.                 pos++;
  733.         }
  734.         new userid = INVALID_PLAYER_ID;
  735.         if ((text[pos]))
  736.         {
  737.                 userid = strval(text[pos]);
  738.                 if (userid >=0 && userid < MAX_PLAYERS)
  739.                 {
  740.                         if(!IsPlayerConnected(userid))
  741.                         {
  742.                                 userid = INVALID_PLAYER_ID;
  743.                         }
  744.                         else
  745.                         {
  746.                                 return userid;
  747.                         }
  748.                 }
  749.         }
  750.         new len = strlen(text[pos]);
  751.         new count = 0;
  752.         new name[MAX_PLAYER_NAME];
  753.         for (new i = 0; i < MAX_PLAYERS; i++)
  754.         {
  755.                 if (IsPlayerConnected(i))
  756.                 {
  757.                         GetPlayerName(i, name, sizeof (name));
  758.                         if (strcmp(name, text[pos], true, len) == 0)
  759.                         {
  760.                                 if (len == strlen(name))
  761.                                 {
  762.                                         return i;
  763.                                 }
  764.                                 else
  765.                                 {
  766.                                         count++;
  767.                                         userid = i;
  768.                                 }
  769.                         }
  770.                 }
  771.         }
  772.         if (count != 1)
  773.         {
  774.                 if (playerid != INVALID_PLAYER_ID)
  775.                 {
  776.                         if (count)
  777.                         {
  778.                                 SendClientMessage(playerid, 0xFF0000AA, "Multiple users found, please narrow search.");
  779.                         }
  780.                         else
  781.                         {
  782.                                 SendClientMessage(playerid, 0xFF0000AA, "No matching user found.");
  783.                         }
  784.                 }
  785.                 userid = INVALID_PLAYER_ID;
  786.         }
  787.         return userid;
  788. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top