Advertisement
Guest User

GM

a guest
Mar 25th, 2012
402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 25.47 KB | None | 0 0
  1. #include <a_samp> /* Includes Utilizadas */
  2. #include <cpstream>
  3.  
  4. #pragma tabsize 0 /* Usado para Esconder Loose Indendation , mas Não é preciso o Uso */
  5.  
  6. #define COR_Verde 0x00FF00FF
  7. #define COR_Vermelho 0xFF0000FF
  8. #define COR_Marrom 0x780000FF
  9. #define COR_AmareloEsverdeado 0x4E5600FF
  10. #define COR_Indefinida 0xA75200FF
  11. #define COR_Roxo 0xA75289FF
  12. #define COR_Lilas 0xA752FFFF
  13. #define COR_Azul 0xA7FFFFFF
  14. #define COR_Branco 0xFFFFFFFF
  15. #define COR_Azul2 0x0000FFFF /* Definições das Cores */
  16.  
  17. #define GROOVE 1
  18. #define BALLAS 2
  19. #define VAGOS 3
  20. #define AZTECAS 4 /* Definições das Gangs */
  21.  
  22. #define DIALOGLIST 1 /* Definição da Caixa de Dialog Usada para os Kits */
  23.  
  24. forward SetupPlayerForClassSelection(playerid);
  25. forward ZoneCheckpointCheckerbyRangel(); /* Forward Utilizada para que Funcione os Check Points */
  26.  
  27. new Text:Textdraw0;
  28. new Gang[MAX_PLAYERS]; /* Criação das Gangs */
  29. new cpzone[MAX_PLAYERS][4]; /* Zonas [ Checkpoints ] , Aumente o Numero se For Adicionar novas Gangs */
  30. new lastcp[MAX_PLAYERS];
  31.  
  32. new Groove;
  33. new Ballas;
  34. new Vagos;
  35. new Aztecas; /* Criando as Gangs */
  36.  
  37. new cpgroove;
  38. new cpballas;
  39. new cpvagos;
  40. new cpaztecas; /* Criando as Checkpoints das Gangs */
  41.  
  42. new gzcolor[4] =
  43. {
  44.     0x33AA33AA, 0x860074AA, 0xFFED00AA, 0x00FFFFAA     /* Definindo a Cor das GANGZONES , Deixe o Final em AA Para ficar transparente a Coloração */
  45. };
  46.  
  47. public OnGameModeInit()
  48. {
  49.     UsePlayerPedAnims(); /* Faz o Personagem Andar Igual o CJ */
  50.     SetGameModeText("TDM Base"); /* Muda o Nome do Game Mode */
  51.     Textdraw0= TextDrawCreate(1.0, 433.0, "Base DM/Team Deathmatch - Feito Por : .FuneraL.");
  52.     TextDrawAlignment(Textdraw0,0);
  53.     TextDrawUseBox(Textdraw0,2);
  54.     TextDrawBackgroundColor(Textdraw0,0x000000FF);
  55.     TextDrawFont(Textdraw0,2);
  56.     TextDrawLetterSize(Textdraw0,0.2900, 1.4);
  57.     TextDrawBoxColor(Textdraw0,0x00000050);                     /* TextDraw Criada Abaixo do Radar */
  58.     TextDrawColor(Textdraw0, 0xFFFFFFFF);
  59.     TextDrawSetOutline(Textdraw0,1);
  60.     TextDrawSetProportional(Textdraw0,1);
  61.     TextDrawSetShadow(Textdraw0,1);
  62.     for(new i; i < MAX_PLAYERS; i ++)
  63.     {
  64.         if(IsPlayerConnected(i))
  65.         {
  66.             TextDrawShowForPlayer(i, Textdraw0);
  67.         }
  68.     }
  69.     SetTimer("ZoneCheckpointCheckerbyRangel", 1000, true); /* Definindo o Tempo de cada Segundo de Dominio , 1000 = 1 Segundo em Milisegundos */
  70.  
  71. /////////////////////////////////////////////////// Adicione os Objetos Ao Seu GM Aqui. //////////////////////////////////////////////////////
  72.  
  73. /////////////////////////////////////////////////// Adicione os Veiculos Criados no Seu GM Aqui. /////////////////////////////////////////////
  74.  
  75.     AddPlayerClass(106,2529.3433,-1667.1549,15.1685,86.9560,0,0,0,0,0,0);
  76.     AddPlayerClass(107,2529.3433,-1667.1549,15.1685,86.9560,0,0,0,0,0,0);
  77.     AddPlayerClass(103,1985.5038,-1233.0305,20.1135,277.3926,0,0,0,0,0,0);
  78.     AddPlayerClass(104,1985.5038,-1233.0305,20.1135,277.3926,0,0,0,0,0,0);
  79.     AddPlayerClass(109,2351.8687,-1167.4008,27.6636,359.5117,0,0,0,0,0,0);
  80.     AddPlayerClass(110,2351.8687,-1167.4008,27.6636,359.5117,0,0,0,0,0,0);
  81.     AddPlayerClass(114,1826.9830,-2002.9410,13.5544,177.0830,0,0,0,0,0,0);
  82.     AddPlayerClass(115,1826.9830,-2002.9410,13.5544,177.0830,0,0,0,0,0,0);  /* Adicionando os Personagens a tela de Seleção */
  83.     //////////////////////////////////////////////////////////////////////////////
  84.     Groove = GangZoneCreate(2391.137, -1748.974, 2630.716, -1618.698);
  85.     Ballas = GangZoneCreate(1843.529, -1267.349, 2075.502, -1125.23);
  86.     Vagos = GangZoneCreate(2292.264, -1314.722, 2360.715, -1156.812);
  87.     Aztecas = GangZoneCreate(1801.698, -2068.74, 1969.022, -1966.099);  /* Cria as Gangzones na Area Definida, Coord X,Y,Z */
  88.     /////////////////////////////////////////////////////////////////////////////
  89.     cpgroove = CPS_AddCheckpoint(2513.2341,-1690.0037,13.5441,2.0,80);
  90.     cpballas = CPS_AddCheckpoint(1971.0333,-1177.5143,20.0234,2.0,80);
  91.     cpvagos = CPS_AddCheckpoint(2335.5303,-1168.9796,28.0508,2.0,80);
  92.     cpaztecas = CPS_AddCheckpoint(1841.8491,-2000.1239,13.5469,2.0,80); /* Cria os Checkpoints na Area Definida , Coord X,Y,Z , Mantenha o 2.0,80); Depois da Coordenada */
  93.     #pragma unused cpballas, cpgroove, cpvagos, cpaztecas /* Pragma Utilizado para Definir as Checkpoint's. */
  94.     return 1;
  95. }
  96.  
  97. public OnPlayerUpdate()
  98. {
  99.     return 1;
  100. }
  101.  
  102. public OnGameModeExit()
  103. {
  104.     return 1;
  105. }
  106.  
  107. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  108. {
  109.     return 1;
  110. }
  111.  
  112. public OnPlayerStateChange(playerid, newstate, oldstate)
  113. {
  114.     return 1;
  115. }
  116.  
  117. public OnPlayerRequestClass(playerid, classid) /* Seleção de Classes Após o Connect */
  118. {
  119.     if(classid == 0) /* Numero de localização de Skin , Exemplo : Primeira , Segunda... */
  120.     {
  121.     Gang[playerid] = GROOVE;  /* Define a Gang que o Player Irá Ser , por isso a New Gang Logo no Topo do GM */
  122.     GameTextForPlayer(playerid,"~y~Groove Street",5000,5); /* GameText Mostrado na tela de Escolha */
  123.     SetPlayerInterior(playerid,3); /* Interior do Player Definido antes de Spawnar. */
  124.     SetPlayerPos(playerid, -2669.8770,1410.3972,912.7240); /* Posição do Player */
  125.     SetPlayerFacingAngle(playerid, 267.7684); /* Angulo */
  126.     SetPlayerCameraPos(playerid, -2663.8770,1410.3972,912.7240); /* Posição da Camera */
  127.     SetPlayerCameraLookAt(playerid, -2669.8770,1410.3972,912.7240);
  128.     ApplyAnimation(playerid,"PED","WALK_DRUNK",4.0,1,1,1,1,0); /* Aplicando Animação a tela Inicial */
  129.     }
  130.     else if(classid == 1)
  131.     {
  132.     Gang[playerid] = GROOVE;
  133.     GameTextForPlayer(playerid,"~y~Groove Street",5000,5);
  134.     SetPlayerInterior(playerid,3);
  135.     SetPlayerPos(playerid, -2669.8770,1410.3972,912.7240);
  136.     SetPlayerFacingAngle(playerid, 267.7684);
  137.     SetPlayerCameraPos(playerid, -2663.8770,1410.3972,912.7240);
  138.     SetPlayerCameraLookAt(playerid, -2669.8770,1410.3972,912.7240);
  139.     ApplyAnimation(playerid,"PED","WALK_DRUNK",4.0,1,1,1,1,0);
  140.     }
  141.     else if(classid == 2)
  142.     {
  143.     Gang[playerid] = BALLAS;
  144.     GameTextForPlayer(playerid,"~y~Gang Dos Ballas",5000,5);
  145.     SetPlayerInterior(playerid,3);
  146.     SetPlayerPos(playerid, -2669.8770,1410.3972,912.7240);
  147.     SetPlayerFacingAngle(playerid, 267.7684);
  148.     SetPlayerCameraPos(playerid, -2663.8770,1410.3972,912.7240);
  149.     SetPlayerCameraLookAt(playerid, -2669.8770,1410.3972,912.7240);
  150.     ApplyAnimation(playerid,"PED","WALK_DRUNK",4.0,1,1,1,1,0);
  151.     }
  152.     else if(classid == 3)
  153.     {
  154.     Gang[playerid] = BALLAS;
  155.     GameTextForPlayer(playerid,"~y~Gang dos Ballas",5000,5);
  156.     SetPlayerInterior(playerid,3);
  157.     SetPlayerPos(playerid, -2669.8770,1410.3972,912.7240);
  158.     SetPlayerFacingAngle(playerid, 267.7684);
  159.     SetPlayerCameraPos(playerid, -2663.8770,1410.3972,912.7240);
  160.     SetPlayerCameraLookAt(playerid, -2669.8770,1410.3972,912.7240);
  161.     ApplyAnimation(playerid,"PED","WALK_DRUNK",4.0,1,1,1,1,0);
  162.     }
  163.     else if(classid == 4)
  164.     {
  165.     Gang[playerid] = VAGOS;
  166.     GameTextForPlayer(playerid,"~y~Gang dos Vagos",5000,5);
  167.     SetPlayerInterior(playerid,3);
  168.     SetPlayerPos(playerid, -2669.8770,1410.3972,912.7240);
  169.     SetPlayerFacingAngle(playerid, 267.7684);
  170.     SetPlayerCameraPos(playerid, -2663.8770,1410.3972,912.7240);
  171.     SetPlayerCameraLookAt(playerid, -2669.8770,1410.3972,912.7240);
  172.     ApplyAnimation(playerid,"PED","WALK_DRUNK",4.0,1,1,1,1,0);
  173.     }
  174.     else if(classid == 5)
  175.     {
  176.     Gang[playerid] = VAGOS;
  177.     GameTextForPlayer(playerid,"~y~Gang dos Vagos",5000,5);
  178.     SetPlayerInterior(playerid,3);
  179.     SetPlayerPos(playerid, -2669.8770,1410.3972,912.7240);
  180.     SetPlayerFacingAngle(playerid, 267.7684);
  181.     SetPlayerCameraPos(playerid, -2663.8770,1410.3972,912.7240);
  182.     SetPlayerCameraLookAt(playerid, -2669.8770,1410.3972,912.7240);
  183.     ApplyAnimation(playerid,"PED","WALK_DRUNK",4.0,1,1,1,1,0);
  184.     }
  185.     else if(classid == 6)
  186.     {
  187.     Gang[playerid] = AZTECAS;
  188.     GameTextForPlayer(playerid,"~y~Gang dos Aztecas",5000,5);
  189.     SetPlayerInterior(playerid,3);
  190.     SetPlayerPos(playerid, -2669.8770,1410.3972,912.7240);
  191.     SetPlayerFacingAngle(playerid, 267.7684);
  192.     SetPlayerCameraPos(playerid, -2663.8770,1410.3972,912.7240);
  193.     SetPlayerCameraLookAt(playerid, -2669.8770,1410.3972,912.7240);
  194.     ApplyAnimation(playerid,"PED","WALK_DRUNK",4.0,1,1,1,1,0);
  195.     }
  196.     else if(classid == 7)
  197.     {
  198.     Gang[playerid] = AZTECAS;
  199.     GameTextForPlayer(playerid,"~y~Gang dos Aztecas",5000,5);
  200.     SetPlayerInterior(playerid,3);
  201.     SetPlayerPos(playerid, -2669.8770,1410.3972,912.7240);
  202.     SetPlayerFacingAngle(playerid, 267.7684);
  203.     SetPlayerCameraPos(playerid, -2663.8770,1410.3972,912.7240);
  204.     SetPlayerCameraLookAt(playerid, -2669.8770,1410.3972,912.7240);
  205.     ApplyAnimation(playerid,"PED","WALK_DRUNK",4.0,1,1,1,1,0);
  206.     }
  207.     return 1;
  208. }
  209.  
  210. public OnPlayerRequestSpawn(playerid) /* Setando o Player Após o Botão Spawn */
  211. {
  212.     if(Gang[playerid] == GROOVE) /* Gang Do Player, Definida Acima */
  213.     {
  214.     SetPlayerInterior(playerid,0); /* Interior Após o Spawn */
  215.     SetPlayerColor(playerid, 0x33AA33AA); /* Cor do NickName */
  216.     }
  217.     else if(Gang[playerid] == BALLAS)
  218.     {
  219.     SetPlayerInterior(playerid,0);
  220.     SetPlayerColor(playerid, 0x860074AA);
  221.     }
  222.     else if(Gang[playerid] == VAGOS)
  223.     {
  224.     SetPlayerInterior(playerid,0);
  225.     SetPlayerColor(playerid, 0xFFED00AA);
  226.     }
  227.     else if(Gang[playerid] == AZTECAS)
  228.     {
  229.     SetPlayerInterior(playerid,0);
  230.     SetPlayerColor(playerid, 0x00FFFFAA);
  231.     }
  232.     return 1;
  233. }
  234.  
  235. public SetupPlayerForClassSelection(playerid)
  236. {
  237.     return 1;
  238. }
  239.  
  240. public OnPlayerConnect(playerid)
  241. {
  242.     SendClientMessage(playerid, 0xFFFFFFFF, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  243.     SendClientMessage(playerid, COR_Branco, "DM/TDM Base");
  244.     SendClientMessage(playerid, COR_Branco, "Creditos A: .FuneraL.");                                         /* Texto Inicial Logo ao Connect */
  245.     SendClientMessage(playerid, 0xFFFFFFFF, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  246.     TextDrawShowForPlayer(playerid, Textdraw0);
  247.     new pname[MAX_PLAYER_NAME];
  248.     new string[256]
  249.     GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
  250.     format(string, sizeof(string), "[SERVER]: %s Entrou no Servidor!", pname);   /* Mostrando para Todos o Player que Logou ao Servidor */
  251.     SendClientMessageToAll(0xFFED00FF, string);
  252.     return 1;
  253. }
  254.  
  255. public OnPlayerDisconnect(playerid, reason)
  256. {
  257.     return 1;
  258. }
  259.  
  260. public OnPlayerSpawn(playerid)
  261. {
  262.     GangZoneShowForPlayer(playerid, Groove, gzcolor[0]);
  263.     GangZoneShowForPlayer(playerid, Ballas, gzcolor[1]);
  264.     GangZoneShowForPlayer(playerid, Vagos, gzcolor[2]);
  265.     GangZoneShowForPlayer(playerid, Aztecas, gzcolor[3]); /* Mostrando as Gangzones Após o Spawn , com as Cores definidas no GZColor */
  266.     return 1;
  267. }
  268.  
  269. public OnPlayerLeaveCheckpoint(playerid)
  270. {
  271.     new checkpointid = lastcp[playerid];
  272.     if(checkpointid > 0 && checkpointid <= 5)/* Aumente se for Acrescentar mais Gangs */
  273.     {
  274.         cpzone[playerid][checkpointid] = 0;
  275.         GangZoneStopFlashForAll(checkpointid-1);
  276.     }
  277.     return 1;
  278. }
  279.  
  280. public ZoneCheckpointCheckerbyRangel()
  281. {
  282.     for(new i; i < MAX_PLAYERS; i++)
  283.     {
  284.         if(!IsPlayerConnected(i))continue;
  285.         if(CPS_GetPlayerCheckpoint(i) > 0 && CPS_GetPlayerCheckpoint(i) <= 5 && /* Aumente o Numero Se For Acrescentar mais Gangs */
  286.  
  287.             gzcolor[CPS_GetPlayerCheckpoint(i)-1] != GetPlayerColor(i))
  288.         {
  289.             if(cpzone[i][CPS_GetPlayerCheckpoint(i)] < 10) /* Domina aos 10 Segundos de Contagem */
  290.             {
  291.                 cpzone[i][CPS_GetPlayerCheckpoint(i)]++;
  292.                 new tmp[10];
  293.                 format(tmp, sizeof tmp, "~w~%2d/10", cpzone[i][CPS_GetPlayerCheckpoint(i)]);
  294.                 GameTextForPlayer(i, tmp, 1001, 4);
  295.                 GangZoneFlashForAll(CPS_GetPlayerCheckpoint(i)-1, GetPlayerColor(i));
  296.             } else if(cpzone[i][CPS_GetPlayerCheckpoint(i)] == 10)
  297.             {
  298.                 GameTextForPlayer(i, "~w~Conquistado", 4000, 1);
  299.                 gzcolor[CPS_GetPlayerCheckpoint(i)-1] = GetPlayerColor(i);
  300.                 GangZoneStopFlashForAll(CPS_GetPlayerCheckpoint(i)-1);
  301.                 GangZoneHideForAll(CPS_GetPlayerCheckpoint(i)-1);
  302.                 GangZoneShowForAll(CPS_GetPlayerCheckpoint(i)-1, GetPlayerColor(i));
  303.             }
  304.         }
  305.     }
  306. }
  307.  
  308. public OnPlayerDeath(playerid, killerid, reason)
  309. {
  310.     return 1;
  311. }
  312.  
  313. public OnPlayerCommandText(playerid, cmdtext[])
  314. {
  315.     if(strcmp("/kits", cmdtext, true) == 0)    /* Comando Utilizado na DialogResponse */
  316.     {
  317.         ShowPlayerDialog(playerid,DIALOGLIST,DIALOG_STYLE_LIST,"Kits","Kit 01 - (R$2000)\nKit 02- (R$4000)\nKit 03 - (R$6000)","Selecionar","Fechar");
  318.         return 1;
  319.     }
  320.     if(strcmp("/creditos", cmdtext, true) == 0)
  321.     {
  322.         new Cred[999]
  323.         new string[256]
  324.         format(string, sizeof(string), "Scripter : .FuneraL.\n"); strcat(Cred, string);
  325.         format(string, sizeof(string), "Iniciando as Gangs : Link_ [Forum SA:MP]\n"); strcat(Cred, string);
  326.         ShowPlayerDialog(playerid,10, DIALOG_STYLE_MSGBOX, "[ Creditos ]", Cred, "Ok", "");
  327.         return 1;
  328.     }
  329.     if(strcmp("/teles", cmdtext, true) == 0)
  330.     {
  331.         new Teles[999]
  332.         new string[256]
  333.         format(string, sizeof(string), "/ls - Ir Para Los Santos\n"); strcat(Teles, string);
  334.         format(string, sizeof(string), "/sf - Ir Para San Fierro\n"); strcat(Teles, string);
  335.         format(string, sizeof(string), "/lv - Ir Para Las Venturas\n"); strcat(Teles, string);
  336.         format(string, sizeof(string), "/arena - Vai para a Guerra na Arena\n"); strcat(Teles, string);
  337.         format(string, sizeof(string), "/predio - Ir Para o Predio em LS\n"); strcat(Teles, string);
  338.         format(string, sizeof(string), "/cemiterio - Ir Para O Cemiterio em LS\n"); strcat(Teles, string);
  339.         format(string, sizeof(string), "/aerols - Ir Para o Aeroporto em Los Santos\n"); strcat(Teles, string);
  340.         format(string, sizeof(string), "/aerosf - Ir Para o Aeroporto em San Fierro\n"); strcat(Teles, string);
  341.         format(string, sizeof(string), "/aerolv - Ir Para o Aeroporto em Las Venturas\n"); strcat(Teles, string);
  342.         format(string, sizeof(string), "/praia - Ir Para a Praia em LS\n"); strcat(Teles, string);
  343.         format(string, sizeof(string), "/hospital - Ir Para o Hospital em Los Santos\n"); strcat(Teles, string);
  344.         format(string, sizeof(string), "/beco - Ir Para o Beco\n"); strcat(Teles, string);
  345.         format(string, sizeof(string), "/prefeitura - Ir Para a Prefeitura em Los Santos\n"); strcat(Teles, string);
  346.         format(string, sizeof(string), "/posto - Ir Para o Posto em Los Santos\n"); strcat(Teles, string);
  347.         format(string, sizeof(string), "/dp - Ir Para o Departamento de Policia\n"); strcat(Teles, string);
  348.         ShowPlayerDialog(playerid,10, DIALOG_STYLE_MSGBOX, "[ Teleportes ]", Teles, "Ok", "");
  349.         return 1;
  350.     }
  351.     if(strcmp("/dp", cmdtext, true) == 0)
  352.     {
  353.         new pname[MAX_PLAYER_NAME] /* Cria a Variavel pname */
  354.         new string[256] /* Cria uma string com o numero de letras permitidas */
  355.         GetPlayerName(playerid, pname, MAX_PLAYER_NAME); /* Pega o Nome do Player */
  356.         format(string, sizeof(string), "%s Foi para o Departamento de Policia ( /dp )", pname); /* Mensagem de Teleporte */
  357.         SendClientMessageToAll(0x0000FFFF, string); /* Mostrará para todos a Mensagem Acima */
  358.         SetPlayerPos(playerid, -1620.0278,692.2532,7.1875); /* Posição do Player */
  359.         SetPlayerVirtualWorld(playerid, 0); /* Virtual World Usado caso Você tenha Algum Bloqueador de Teleportes */
  360.         ResetPlayerWeapons(playerid); /* Reseta as Armas do Jogador */
  361.         return 1;
  362.     }
  363.     if(strcmp("/posto", cmdtext, true) == 0)
  364.     {
  365.         new pname[MAX_PLAYER_NAME]
  366.         new string[256]
  367.         GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
  368.         format(string, sizeof(string), "%s Foi para o Posto ( /posto )", pname);
  369.         SendClientMessageToAll(0x0000FFFF, string);
  370.         SetPlayerPos(playerid, 1936.4386,-1773.2572,13.3828);
  371.         SetPlayerVirtualWorld(playerid, 0);
  372.         ResetPlayerWeapons(playerid);
  373.         return 1;
  374.     }
  375.     if(strcmp("/prefeitura", cmdtext, true) == 0)
  376.     {
  377.         new pname[MAX_PLAYER_NAME]
  378.         new string[256]
  379.         GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
  380.         format(string, sizeof(string), "%s Foi para a Prefeitura ( /prefeitura )", pname);
  381.         SendClientMessageToAll(0x0000FFFF, string);
  382.         SetPlayerPos(playerid, 1127.9849,-2037.0720,69.7010);
  383.         SetPlayerVirtualWorld(playerid, 0);
  384.         ResetPlayerWeapons(playerid);
  385.         return 1;
  386.     }
  387.     if(strcmp("/beco", cmdtext, true) == 0)
  388.     {
  389.         new pname[MAX_PLAYER_NAME]
  390.         new string[256]
  391.         GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
  392.         format(string, sizeof(string), "%s Foi para o Beco ( /beco )", pname);
  393.         SendClientMessageToAll(0x0000FFFF, string);
  394.         SetPlayerPos(playerid, 1339.5070,-1819.6908,13.5590);
  395.         SetPlayerVirtualWorld(playerid, 0);
  396.         ResetPlayerWeapons(playerid);
  397.         return 1;
  398.     }
  399.     if(strcmp("/hospital", cmdtext, true) == 0)
  400.     {
  401.         new pname[MAX_PLAYER_NAME]
  402.         new string[256]
  403.         GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
  404.         format(string, sizeof(string), "%s Foi para o Hospital ( /hospital )", pname);
  405.         SendClientMessageToAll(0x0000FFFF, string);
  406.         SetPlayerPos(playerid, 1178.8738,-1323.7737,14.1416);
  407.         SetPlayerVirtualWorld(playerid, 0);
  408.         ResetPlayerWeapons(playerid);
  409.         return 1;
  410.     }
  411.     if(strcmp("/praia", cmdtext, true) == 0)
  412.     {
  413.         new pname[MAX_PLAYER_NAME]
  414.         new string[256]
  415.         GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
  416.         format(string, sizeof(string), "%s Foi para a Praia ( /praia )", pname);
  417.         SendClientMessageToAll(0x0000FFFF, string);
  418.         SetPlayerPos(playerid, 306.1144,-1857.7875,3.1146);
  419.         SetPlayerVirtualWorld(playerid, 0);
  420.         ResetPlayerWeapons(playerid);
  421.         return 1;
  422.     }
  423.     if(strcmp("/aerolv", cmdtext, true) == 0)
  424.     {
  425.         new pname[MAX_PLAYER_NAME]
  426.         new string[256]
  427.         GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
  428.         format(string, sizeof(string), "%s Foi para o Aeroporto de LV ( /aerolv )", pname);
  429.         SendClientMessageToAll(0x0000FFFF, string);
  430.         SetPlayerPos(playerid, 1595.5490,1448.8777,10.8280);
  431.         SetPlayerVirtualWorld(playerid, 0);
  432.         ResetPlayerWeapons(playerid);
  433.         return 1;
  434.     }
  435.     if(strcmp("/aerosf", cmdtext, true) == 0)
  436.     {
  437.         new pname[MAX_PLAYER_NAME]
  438.         new string[256]
  439.         GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
  440.         format(string, sizeof(string), "%s Foi para o Aeroporto de SF ( /aerosf )", pname);
  441.         SendClientMessageToAll(0x0000FFFF, string);
  442.         SetPlayerPos(playerid, -1361.9777,-252.3983,14.1440);
  443.         SetPlayerVirtualWorld(playerid, 0);
  444.         ResetPlayerWeapons(playerid);
  445.         return 1;
  446.     }
  447.     if(strcmp("/aerols", cmdtext, true) == 0)
  448.     {
  449.         new pname[MAX_PLAYER_NAME]
  450.         new string[256]
  451.         GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
  452.         format(string, sizeof(string), "%s Foi para o Aeroporto de LS ( /aerols )", pname);
  453.         SendClientMessageToAll(0x0000FFFF, string);
  454.         SetPlayerPos(playerid, 1731.4958,-2404.5503,13.5547);
  455.         SetPlayerVirtualWorld(playerid, 0);
  456.         ResetPlayerWeapons(playerid);
  457.         return 1;
  458.     }
  459.     if(strcmp("/cemiterio", cmdtext, true) == 0)
  460.     {
  461.         new pname[MAX_PLAYER_NAME]
  462.         new string[256]
  463.         GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
  464.         format(string, sizeof(string), "%s Foi para o Cemiterio ( /cemiterio )", pname);
  465.         SendClientMessageToAll(0x0000FFFF, string);
  466.         SetPlayerPos(playerid, 892.5180,-1101.8450,23.6953);
  467.         SetPlayerVirtualWorld(playerid, 0);
  468.         GivePlayerWeapon(playerid, 14, 1);
  469.         return 1;
  470.     }
  471.     if(strcmp("/predio", cmdtext, true) == 0)
  472.     {
  473.         new pname[MAX_PLAYER_NAME]
  474.         new string[256]
  475.         GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
  476.         format(string, sizeof(string), "%s Foi para o Predio ( /predio )", pname);
  477.         SendClientMessageToAll(0x0000FFFF, string);
  478.         SetPlayerPos(playerid, 1544.2941,-1353.6318,329.4738);
  479.         SetPlayerVirtualWorld(playerid, 0);
  480.         ResetPlayerWeapons(playerid);
  481.         return 1;
  482.     }
  483.     if(strcmp("/arena", cmdtext, true) == 0)
  484.     {
  485.         new pname[MAX_PLAYER_NAME]
  486.         new string[256]
  487.         GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
  488.         format(string, sizeof(string), "%s Foi para Arena ( /arena )", pname);
  489.         SendClientMessageToAll(0x0000FFFF, string);
  490.         SetPlayerPos(playerid, 1383.4331,2184.4934,11.0234);
  491.         SetPlayerVirtualWorld(playerid, 0);
  492.         GivePlayerWeapon(playerid, 24, 9999);
  493.         GivePlayerWeapon(playerid, 26, 9999);
  494.         GivePlayerWeapon(playerid, 29, 9999);
  495.         return 1;
  496.     }
  497.     if(strcmp("/lv", cmdtext, true) == 0)
  498.     {
  499.         new pname[MAX_PLAYER_NAME]
  500.         new string[256]
  501.         GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
  502.         format(string, sizeof(string), "%s Foi para Las Venturas ( /lv )", pname);
  503.         SendClientMessageToAll(0x0000FFFF, string);
  504.         SetPlayerPos(playerid, 2027.4448,1007.4595,10.8203);
  505.         SetPlayerVirtualWorld(playerid, 0);
  506.         return 1;
  507.     }
  508.     if(strcmp("/sf", cmdtext, true) == 0)
  509.     {
  510.         new pname[MAX_PLAYER_NAME]
  511.         new string[256]
  512.         GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
  513.         format(string, sizeof(string), "%s Foi para San Fierro ( /sf )", pname);
  514.         SendClientMessageToAll(0x0000FFFF, string);
  515.         SetPlayerPos(playerid, -1481.6797,834.3612,7.1875);
  516.         SetPlayerVirtualWorld(playerid, 0);
  517.         return 1;
  518.     }
  519.     if(strcmp("/ls", cmdtext, true) == 0)
  520.     {
  521.         new pname[MAX_PLAYER_NAME]
  522.         new string[256]
  523.         GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
  524.         format(string, sizeof(string), "%s Foi para Los Santos ( /ls )", pname);
  525.         SendClientMessageToAll(0x0000FFFF, string);
  526.         SetPlayerPos(playerid, 1649.3744,-1009.4433,24.0656);
  527.         SetPlayerVirtualWorld(playerid, 0);
  528.         return 1;
  529.     }
  530.     return 0;
  531. }
  532.  
  533. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  534. {
  535.     if(dialogid == DIALOGLIST) {
  536.     if(response)
  537.     {
  538.         switch(listitem)
  539.             {
  540.                 case 0:
  541.                 {
  542.                     if(GetPlayerMoney(playerid) < 2000) return SendClientMessage(playerid, COR_Vermelho, "[ERRO]: Você não Tem Dinheiro Suficiente!");
  543.                     GivePlayerWeapon(playerid, 4, 1);
  544.                     GivePlayerWeapon(playerid, 23, 350);
  545.                     GivePlayerWeapon(playerid, 27, 300);
  546.                     GivePlayerWeapon(playerid, 28, 400);
  547.                     GivePlayerWeapon(playerid, 33, 500);
  548.                     SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}[SHOP]:{FFFFFF} Você Comprou o Kit 01 e Gastou R$ 2000!");
  549.                     GivePlayerMoney(playerid, -2000);
  550.                     }
  551.                 case 1:
  552.                 {
  553.                     if(GetPlayerMoney(playerid) < 4000) return SendClientMessage(playerid, COR_Vermelho, "[ERRO]: Você não Tem Dinheiro Suficiente!");
  554.                     GivePlayerWeapon(playerid, 5, 1);
  555.                     GivePlayerWeapon(playerid, 24, 250);
  556.                     GivePlayerWeapon(playerid, 26, 250);
  557.                     GivePlayerWeapon(playerid, 32, 300);
  558.                     GivePlayerWeapon(playerid, 31, 350);
  559.                     SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}[SHOP]:{FFFFFF} Você Comprou o Kit 02 e Gastou R$ 4000!");                           /* Dialog do /kits */
  560.                     GivePlayerMoney(playerid, -4000);
  561.                     }
  562.                 case 2:
  563.                 {
  564.                     if(GetPlayerMoney(playerid) < 6000) return SendClientMessage(playerid, COR_Vermelho, "[ERRO]: Você não Tem Dinheiro Suficiente!");
  565.                     GivePlayerWeapon(playerid, 8, 1);
  566.                     GivePlayerWeapon(playerid, 24, 300);
  567.                     GivePlayerWeapon(playerid, 25, 300);
  568.                     GivePlayerWeapon(playerid, 29, 350);
  569.                     GivePlayerWeapon(playerid, 30, 350);
  570.                     GivePlayerWeapon(playerid, 34, 450);
  571.                     SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}[SHOP]:{FFFFFF} Você Comprou o Kit 03 e Gastou R$ 6000!");
  572.                     GivePlayerMoney(playerid, -6000);
  573.                     }
  574.                 }
  575.             }
  576.     }
  577.     return 1;
  578. }
  579.  
  580. /* Observação : Se Você quiser Utilizar Comandos Para Teleportar com Veículo , Utilize o Seguinte Código :
  581.  
  582.     if(!strcmp(cmdtext, "//exemplo", true)){
  583.     if(!IsPlayerInAnyVehicle(playerid)){
  584.        SetPlayerPos(playerid, 0.0, 0.0, 0.0);
  585.        SetPlayerFacingAngle(playerid, 0.0);
  586.        SetPlayerInterior(playerid, 0);
  587.        SetPlayerVirtualWorld(playerid, 0);
  588.     }
  589.     else{
  590.        new veh = GetPlayerVehicleID(playerid);
  591.        SetVehiclePos(veh, 0.0, 0.0, 0.0);
  592.        SetVehicleZAngle(veh, 0.0);
  593.        LinkVehicleToInterior(veh, 0);
  594.        SetVehicleVirtualWorld(veh, 0);
  595.        PutPlayerInVehicle(playerid, veh, 0);
  596.     }
  597.     return 1;
  598. }
  599.  
  600. Apenas Mude os Valores para os Do Seu Teleporte !
  601.  
  602. Este GM Foi Feito Para Estudos , e Não para Ter Direitos Autorais.
  603.  
  604. é Basico Mas Ajuda Bastante quem está iniciando nesta area.*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement