Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp> /* Includes Utilizadas */
- #include <cpstream>
- #pragma tabsize 0 /* Usado para Esconder Loose Indendation , mas Não é preciso o Uso */
- #define COR_Verde 0x00FF00FF
- #define COR_Vermelho 0xFF0000FF
- #define COR_Marrom 0x780000FF
- #define COR_AmareloEsverdeado 0x4E5600FF
- #define COR_Indefinida 0xA75200FF
- #define COR_Roxo 0xA75289FF
- #define COR_Lilas 0xA752FFFF
- #define COR_Azul 0xA7FFFFFF
- #define COR_Branco 0xFFFFFFFF
- #define COR_Azul2 0x0000FFFF /* Definições das Cores */
- #define GROOVE 1
- #define BALLAS 2
- #define VAGOS 3
- #define AZTECAS 4 /* Definições das Gangs */
- #define DIALOGLIST 1 /* Definição da Caixa de Dialog Usada para os Kits */
- forward SetupPlayerForClassSelection(playerid);
- forward ZoneCheckpointCheckerbyRangel(); /* Forward Utilizada para que Funcione os Check Points */
- new Text:Textdraw0;
- new Gang[MAX_PLAYERS]; /* Criação das Gangs */
- new cpzone[MAX_PLAYERS][4]; /* Zonas [ Checkpoints ] , Aumente o Numero se For Adicionar novas Gangs */
- new lastcp[MAX_PLAYERS];
- new Groove;
- new Ballas;
- new Vagos;
- new Aztecas; /* Criando as Gangs */
- new cpgroove;
- new cpballas;
- new cpvagos;
- new cpaztecas; /* Criando as Checkpoints das Gangs */
- new gzcolor[4] =
- {
- 0x33AA33AA, 0x860074AA, 0xFFED00AA, 0x00FFFFAA /* Definindo a Cor das GANGZONES , Deixe o Final em AA Para ficar transparente a Coloração */
- };
- public OnGameModeInit()
- {
- UsePlayerPedAnims(); /* Faz o Personagem Andar Igual o CJ */
- SetGameModeText("TDM Base"); /* Muda o Nome do Game Mode */
- Textdraw0= TextDrawCreate(1.0, 433.0, "Base DM/Team Deathmatch - Feito Por : .FuneraL.");
- TextDrawAlignment(Textdraw0,0);
- TextDrawUseBox(Textdraw0,2);
- TextDrawBackgroundColor(Textdraw0,0x000000FF);
- TextDrawFont(Textdraw0,2);
- TextDrawLetterSize(Textdraw0,0.2900, 1.4);
- TextDrawBoxColor(Textdraw0,0x00000050); /* TextDraw Criada Abaixo do Radar */
- TextDrawColor(Textdraw0, 0xFFFFFFFF);
- TextDrawSetOutline(Textdraw0,1);
- TextDrawSetProportional(Textdraw0,1);
- TextDrawSetShadow(Textdraw0,1);
- for(new i; i < MAX_PLAYERS; i ++)
- {
- if(IsPlayerConnected(i))
- {
- TextDrawShowForPlayer(i, Textdraw0);
- }
- }
- SetTimer("ZoneCheckpointCheckerbyRangel", 1000, true); /* Definindo o Tempo de cada Segundo de Dominio , 1000 = 1 Segundo em Milisegundos */
- /////////////////////////////////////////////////// Adicione os Objetos Ao Seu GM Aqui. //////////////////////////////////////////////////////
- /////////////////////////////////////////////////// Adicione os Veiculos Criados no Seu GM Aqui. /////////////////////////////////////////////
- AddPlayerClass(106,2529.3433,-1667.1549,15.1685,86.9560,0,0,0,0,0,0);
- AddPlayerClass(107,2529.3433,-1667.1549,15.1685,86.9560,0,0,0,0,0,0);
- AddPlayerClass(103,1985.5038,-1233.0305,20.1135,277.3926,0,0,0,0,0,0);
- AddPlayerClass(104,1985.5038,-1233.0305,20.1135,277.3926,0,0,0,0,0,0);
- AddPlayerClass(109,2351.8687,-1167.4008,27.6636,359.5117,0,0,0,0,0,0);
- AddPlayerClass(110,2351.8687,-1167.4008,27.6636,359.5117,0,0,0,0,0,0);
- AddPlayerClass(114,1826.9830,-2002.9410,13.5544,177.0830,0,0,0,0,0,0);
- AddPlayerClass(115,1826.9830,-2002.9410,13.5544,177.0830,0,0,0,0,0,0); /* Adicionando os Personagens a tela de Seleção */
- //////////////////////////////////////////////////////////////////////////////
- Groove = GangZoneCreate(2391.137, -1748.974, 2630.716, -1618.698);
- Ballas = GangZoneCreate(1843.529, -1267.349, 2075.502, -1125.23);
- Vagos = GangZoneCreate(2292.264, -1314.722, 2360.715, -1156.812);
- Aztecas = GangZoneCreate(1801.698, -2068.74, 1969.022, -1966.099); /* Cria as Gangzones na Area Definida, Coord X,Y,Z */
- /////////////////////////////////////////////////////////////////////////////
- cpgroove = CPS_AddCheckpoint(2513.2341,-1690.0037,13.5441,2.0,80);
- cpballas = CPS_AddCheckpoint(1971.0333,-1177.5143,20.0234,2.0,80);
- cpvagos = CPS_AddCheckpoint(2335.5303,-1168.9796,28.0508,2.0,80);
- 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 */
- #pragma unused cpballas, cpgroove, cpvagos, cpaztecas /* Pragma Utilizado para Definir as Checkpoint's. */
- return 1;
- }
- public OnPlayerUpdate()
- {
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid) /* Seleção de Classes Após o Connect */
- {
- if(classid == 0) /* Numero de localização de Skin , Exemplo : Primeira , Segunda... */
- {
- Gang[playerid] = GROOVE; /* Define a Gang que o Player Irá Ser , por isso a New Gang Logo no Topo do GM */
- GameTextForPlayer(playerid,"~y~Groove Street",5000,5); /* GameText Mostrado na tela de Escolha */
- SetPlayerInterior(playerid,3); /* Interior do Player Definido antes de Spawnar. */
- SetPlayerPos(playerid, -2669.8770,1410.3972,912.7240); /* Posição do Player */
- SetPlayerFacingAngle(playerid, 267.7684); /* Angulo */
- SetPlayerCameraPos(playerid, -2663.8770,1410.3972,912.7240); /* Posição da Camera */
- SetPlayerCameraLookAt(playerid, -2669.8770,1410.3972,912.7240);
- ApplyAnimation(playerid,"PED","WALK_DRUNK",4.0,1,1,1,1,0); /* Aplicando Animação a tela Inicial */
- }
- else if(classid == 1)
- {
- Gang[playerid] = GROOVE;
- GameTextForPlayer(playerid,"~y~Groove Street",5000,5);
- SetPlayerInterior(playerid,3);
- SetPlayerPos(playerid, -2669.8770,1410.3972,912.7240);
- SetPlayerFacingAngle(playerid, 267.7684);
- SetPlayerCameraPos(playerid, -2663.8770,1410.3972,912.7240);
- SetPlayerCameraLookAt(playerid, -2669.8770,1410.3972,912.7240);
- ApplyAnimation(playerid,"PED","WALK_DRUNK",4.0,1,1,1,1,0);
- }
- else if(classid == 2)
- {
- Gang[playerid] = BALLAS;
- GameTextForPlayer(playerid,"~y~Gang Dos Ballas",5000,5);
- SetPlayerInterior(playerid,3);
- SetPlayerPos(playerid, -2669.8770,1410.3972,912.7240);
- SetPlayerFacingAngle(playerid, 267.7684);
- SetPlayerCameraPos(playerid, -2663.8770,1410.3972,912.7240);
- SetPlayerCameraLookAt(playerid, -2669.8770,1410.3972,912.7240);
- ApplyAnimation(playerid,"PED","WALK_DRUNK",4.0,1,1,1,1,0);
- }
- else if(classid == 3)
- {
- Gang[playerid] = BALLAS;
- GameTextForPlayer(playerid,"~y~Gang dos Ballas",5000,5);
- SetPlayerInterior(playerid,3);
- SetPlayerPos(playerid, -2669.8770,1410.3972,912.7240);
- SetPlayerFacingAngle(playerid, 267.7684);
- SetPlayerCameraPos(playerid, -2663.8770,1410.3972,912.7240);
- SetPlayerCameraLookAt(playerid, -2669.8770,1410.3972,912.7240);
- ApplyAnimation(playerid,"PED","WALK_DRUNK",4.0,1,1,1,1,0);
- }
- else if(classid == 4)
- {
- Gang[playerid] = VAGOS;
- GameTextForPlayer(playerid,"~y~Gang dos Vagos",5000,5);
- SetPlayerInterior(playerid,3);
- SetPlayerPos(playerid, -2669.8770,1410.3972,912.7240);
- SetPlayerFacingAngle(playerid, 267.7684);
- SetPlayerCameraPos(playerid, -2663.8770,1410.3972,912.7240);
- SetPlayerCameraLookAt(playerid, -2669.8770,1410.3972,912.7240);
- ApplyAnimation(playerid,"PED","WALK_DRUNK",4.0,1,1,1,1,0);
- }
- else if(classid == 5)
- {
- Gang[playerid] = VAGOS;
- GameTextForPlayer(playerid,"~y~Gang dos Vagos",5000,5);
- SetPlayerInterior(playerid,3);
- SetPlayerPos(playerid, -2669.8770,1410.3972,912.7240);
- SetPlayerFacingAngle(playerid, 267.7684);
- SetPlayerCameraPos(playerid, -2663.8770,1410.3972,912.7240);
- SetPlayerCameraLookAt(playerid, -2669.8770,1410.3972,912.7240);
- ApplyAnimation(playerid,"PED","WALK_DRUNK",4.0,1,1,1,1,0);
- }
- else if(classid == 6)
- {
- Gang[playerid] = AZTECAS;
- GameTextForPlayer(playerid,"~y~Gang dos Aztecas",5000,5);
- SetPlayerInterior(playerid,3);
- SetPlayerPos(playerid, -2669.8770,1410.3972,912.7240);
- SetPlayerFacingAngle(playerid, 267.7684);
- SetPlayerCameraPos(playerid, -2663.8770,1410.3972,912.7240);
- SetPlayerCameraLookAt(playerid, -2669.8770,1410.3972,912.7240);
- ApplyAnimation(playerid,"PED","WALK_DRUNK",4.0,1,1,1,1,0);
- }
- else if(classid == 7)
- {
- Gang[playerid] = AZTECAS;
- GameTextForPlayer(playerid,"~y~Gang dos Aztecas",5000,5);
- SetPlayerInterior(playerid,3);
- SetPlayerPos(playerid, -2669.8770,1410.3972,912.7240);
- SetPlayerFacingAngle(playerid, 267.7684);
- SetPlayerCameraPos(playerid, -2663.8770,1410.3972,912.7240);
- SetPlayerCameraLookAt(playerid, -2669.8770,1410.3972,912.7240);
- ApplyAnimation(playerid,"PED","WALK_DRUNK",4.0,1,1,1,1,0);
- }
- return 1;
- }
- public OnPlayerRequestSpawn(playerid) /* Setando o Player Após o Botão Spawn */
- {
- if(Gang[playerid] == GROOVE) /* Gang Do Player, Definida Acima */
- {
- SetPlayerInterior(playerid,0); /* Interior Após o Spawn */
- SetPlayerColor(playerid, 0x33AA33AA); /* Cor do NickName */
- }
- else if(Gang[playerid] == BALLAS)
- {
- SetPlayerInterior(playerid,0);
- SetPlayerColor(playerid, 0x860074AA);
- }
- else if(Gang[playerid] == VAGOS)
- {
- SetPlayerInterior(playerid,0);
- SetPlayerColor(playerid, 0xFFED00AA);
- }
- else if(Gang[playerid] == AZTECAS)
- {
- SetPlayerInterior(playerid,0);
- SetPlayerColor(playerid, 0x00FFFFAA);
- }
- return 1;
- }
- public SetupPlayerForClassSelection(playerid)
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- SendClientMessage(playerid, 0xFFFFFFFF, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- SendClientMessage(playerid, COR_Branco, "DM/TDM Base");
- SendClientMessage(playerid, COR_Branco, "Creditos A: .FuneraL."); /* Texto Inicial Logo ao Connect */
- SendClientMessage(playerid, 0xFFFFFFFF, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- TextDrawShowForPlayer(playerid, Textdraw0);
- new pname[MAX_PLAYER_NAME];
- new string[256]
- GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
- format(string, sizeof(string), "[SERVER]: %s Entrou no Servidor!", pname); /* Mostrando para Todos o Player que Logou ao Servidor */
- SendClientMessageToAll(0xFFED00FF, string);
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- GangZoneShowForPlayer(playerid, Groove, gzcolor[0]);
- GangZoneShowForPlayer(playerid, Ballas, gzcolor[1]);
- GangZoneShowForPlayer(playerid, Vagos, gzcolor[2]);
- GangZoneShowForPlayer(playerid, Aztecas, gzcolor[3]); /* Mostrando as Gangzones Após o Spawn , com as Cores definidas no GZColor */
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- new checkpointid = lastcp[playerid];
- if(checkpointid > 0 && checkpointid <= 5)/* Aumente se for Acrescentar mais Gangs */
- {
- cpzone[playerid][checkpointid] = 0;
- GangZoneStopFlashForAll(checkpointid-1);
- }
- return 1;
- }
- public ZoneCheckpointCheckerbyRangel()
- {
- for(new i; i < MAX_PLAYERS; i++)
- {
- if(!IsPlayerConnected(i))continue;
- if(CPS_GetPlayerCheckpoint(i) > 0 && CPS_GetPlayerCheckpoint(i) <= 5 && /* Aumente o Numero Se For Acrescentar mais Gangs */
- gzcolor[CPS_GetPlayerCheckpoint(i)-1] != GetPlayerColor(i))
- {
- if(cpzone[i][CPS_GetPlayerCheckpoint(i)] < 10) /* Domina aos 10 Segundos de Contagem */
- {
- cpzone[i][CPS_GetPlayerCheckpoint(i)]++;
- new tmp[10];
- format(tmp, sizeof tmp, "~w~%2d/10", cpzone[i][CPS_GetPlayerCheckpoint(i)]);
- GameTextForPlayer(i, tmp, 1001, 4);
- GangZoneFlashForAll(CPS_GetPlayerCheckpoint(i)-1, GetPlayerColor(i));
- } else if(cpzone[i][CPS_GetPlayerCheckpoint(i)] == 10)
- {
- GameTextForPlayer(i, "~w~Conquistado", 4000, 1);
- gzcolor[CPS_GetPlayerCheckpoint(i)-1] = GetPlayerColor(i);
- GangZoneStopFlashForAll(CPS_GetPlayerCheckpoint(i)-1);
- GangZoneHideForAll(CPS_GetPlayerCheckpoint(i)-1);
- GangZoneShowForAll(CPS_GetPlayerCheckpoint(i)-1, GetPlayerColor(i));
- }
- }
- }
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(strcmp("/kits", cmdtext, true) == 0) /* Comando Utilizado na DialogResponse */
- {
- ShowPlayerDialog(playerid,DIALOGLIST,DIALOG_STYLE_LIST,"Kits","Kit 01 - (R$2000)\nKit 02- (R$4000)\nKit 03 - (R$6000)","Selecionar","Fechar");
- return 1;
- }
- if(strcmp("/creditos", cmdtext, true) == 0)
- {
- new Cred[999]
- new string[256]
- format(string, sizeof(string), "Scripter : .FuneraL.\n"); strcat(Cred, string);
- format(string, sizeof(string), "Iniciando as Gangs : Link_ [Forum SA:MP]\n"); strcat(Cred, string);
- ShowPlayerDialog(playerid,10, DIALOG_STYLE_MSGBOX, "[ Creditos ]", Cred, "Ok", "");
- return 1;
- }
- if(strcmp("/teles", cmdtext, true) == 0)
- {
- new Teles[999]
- new string[256]
- format(string, sizeof(string), "/ls - Ir Para Los Santos\n"); strcat(Teles, string);
- format(string, sizeof(string), "/sf - Ir Para San Fierro\n"); strcat(Teles, string);
- format(string, sizeof(string), "/lv - Ir Para Las Venturas\n"); strcat(Teles, string);
- format(string, sizeof(string), "/arena - Vai para a Guerra na Arena\n"); strcat(Teles, string);
- format(string, sizeof(string), "/predio - Ir Para o Predio em LS\n"); strcat(Teles, string);
- format(string, sizeof(string), "/cemiterio - Ir Para O Cemiterio em LS\n"); strcat(Teles, string);
- format(string, sizeof(string), "/aerols - Ir Para o Aeroporto em Los Santos\n"); strcat(Teles, string);
- format(string, sizeof(string), "/aerosf - Ir Para o Aeroporto em San Fierro\n"); strcat(Teles, string);
- format(string, sizeof(string), "/aerolv - Ir Para o Aeroporto em Las Venturas\n"); strcat(Teles, string);
- format(string, sizeof(string), "/praia - Ir Para a Praia em LS\n"); strcat(Teles, string);
- format(string, sizeof(string), "/hospital - Ir Para o Hospital em Los Santos\n"); strcat(Teles, string);
- format(string, sizeof(string), "/beco - Ir Para o Beco\n"); strcat(Teles, string);
- format(string, sizeof(string), "/prefeitura - Ir Para a Prefeitura em Los Santos\n"); strcat(Teles, string);
- format(string, sizeof(string), "/posto - Ir Para o Posto em Los Santos\n"); strcat(Teles, string);
- format(string, sizeof(string), "/dp - Ir Para o Departamento de Policia\n"); strcat(Teles, string);
- ShowPlayerDialog(playerid,10, DIALOG_STYLE_MSGBOX, "[ Teleportes ]", Teles, "Ok", "");
- return 1;
- }
- if(strcmp("/dp", cmdtext, true) == 0)
- {
- new pname[MAX_PLAYER_NAME] /* Cria a Variavel pname */
- new string[256] /* Cria uma string com o numero de letras permitidas */
- GetPlayerName(playerid, pname, MAX_PLAYER_NAME); /* Pega o Nome do Player */
- format(string, sizeof(string), "%s Foi para o Departamento de Policia ( /dp )", pname); /* Mensagem de Teleporte */
- SendClientMessageToAll(0x0000FFFF, string); /* Mostrará para todos a Mensagem Acima */
- SetPlayerPos(playerid, -1620.0278,692.2532,7.1875); /* Posição do Player */
- SetPlayerVirtualWorld(playerid, 0); /* Virtual World Usado caso Você tenha Algum Bloqueador de Teleportes */
- ResetPlayerWeapons(playerid); /* Reseta as Armas do Jogador */
- return 1;
- }
- if(strcmp("/posto", cmdtext, true) == 0)
- {
- new pname[MAX_PLAYER_NAME]
- new string[256]
- GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
- format(string, sizeof(string), "%s Foi para o Posto ( /posto )", pname);
- SendClientMessageToAll(0x0000FFFF, string);
- SetPlayerPos(playerid, 1936.4386,-1773.2572,13.3828);
- SetPlayerVirtualWorld(playerid, 0);
- ResetPlayerWeapons(playerid);
- return 1;
- }
- if(strcmp("/prefeitura", cmdtext, true) == 0)
- {
- new pname[MAX_PLAYER_NAME]
- new string[256]
- GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
- format(string, sizeof(string), "%s Foi para a Prefeitura ( /prefeitura )", pname);
- SendClientMessageToAll(0x0000FFFF, string);
- SetPlayerPos(playerid, 1127.9849,-2037.0720,69.7010);
- SetPlayerVirtualWorld(playerid, 0);
- ResetPlayerWeapons(playerid);
- return 1;
- }
- if(strcmp("/beco", cmdtext, true) == 0)
- {
- new pname[MAX_PLAYER_NAME]
- new string[256]
- GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
- format(string, sizeof(string), "%s Foi para o Beco ( /beco )", pname);
- SendClientMessageToAll(0x0000FFFF, string);
- SetPlayerPos(playerid, 1339.5070,-1819.6908,13.5590);
- SetPlayerVirtualWorld(playerid, 0);
- ResetPlayerWeapons(playerid);
- return 1;
- }
- if(strcmp("/hospital", cmdtext, true) == 0)
- {
- new pname[MAX_PLAYER_NAME]
- new string[256]
- GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
- format(string, sizeof(string), "%s Foi para o Hospital ( /hospital )", pname);
- SendClientMessageToAll(0x0000FFFF, string);
- SetPlayerPos(playerid, 1178.8738,-1323.7737,14.1416);
- SetPlayerVirtualWorld(playerid, 0);
- ResetPlayerWeapons(playerid);
- return 1;
- }
- if(strcmp("/praia", cmdtext, true) == 0)
- {
- new pname[MAX_PLAYER_NAME]
- new string[256]
- GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
- format(string, sizeof(string), "%s Foi para a Praia ( /praia )", pname);
- SendClientMessageToAll(0x0000FFFF, string);
- SetPlayerPos(playerid, 306.1144,-1857.7875,3.1146);
- SetPlayerVirtualWorld(playerid, 0);
- ResetPlayerWeapons(playerid);
- return 1;
- }
- if(strcmp("/aerolv", cmdtext, true) == 0)
- {
- new pname[MAX_PLAYER_NAME]
- new string[256]
- GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
- format(string, sizeof(string), "%s Foi para o Aeroporto de LV ( /aerolv )", pname);
- SendClientMessageToAll(0x0000FFFF, string);
- SetPlayerPos(playerid, 1595.5490,1448.8777,10.8280);
- SetPlayerVirtualWorld(playerid, 0);
- ResetPlayerWeapons(playerid);
- return 1;
- }
- if(strcmp("/aerosf", cmdtext, true) == 0)
- {
- new pname[MAX_PLAYER_NAME]
- new string[256]
- GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
- format(string, sizeof(string), "%s Foi para o Aeroporto de SF ( /aerosf )", pname);
- SendClientMessageToAll(0x0000FFFF, string);
- SetPlayerPos(playerid, -1361.9777,-252.3983,14.1440);
- SetPlayerVirtualWorld(playerid, 0);
- ResetPlayerWeapons(playerid);
- return 1;
- }
- if(strcmp("/aerols", cmdtext, true) == 0)
- {
- new pname[MAX_PLAYER_NAME]
- new string[256]
- GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
- format(string, sizeof(string), "%s Foi para o Aeroporto de LS ( /aerols )", pname);
- SendClientMessageToAll(0x0000FFFF, string);
- SetPlayerPos(playerid, 1731.4958,-2404.5503,13.5547);
- SetPlayerVirtualWorld(playerid, 0);
- ResetPlayerWeapons(playerid);
- return 1;
- }
- if(strcmp("/cemiterio", cmdtext, true) == 0)
- {
- new pname[MAX_PLAYER_NAME]
- new string[256]
- GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
- format(string, sizeof(string), "%s Foi para o Cemiterio ( /cemiterio )", pname);
- SendClientMessageToAll(0x0000FFFF, string);
- SetPlayerPos(playerid, 892.5180,-1101.8450,23.6953);
- SetPlayerVirtualWorld(playerid, 0);
- GivePlayerWeapon(playerid, 14, 1);
- return 1;
- }
- if(strcmp("/predio", cmdtext, true) == 0)
- {
- new pname[MAX_PLAYER_NAME]
- new string[256]
- GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
- format(string, sizeof(string), "%s Foi para o Predio ( /predio )", pname);
- SendClientMessageToAll(0x0000FFFF, string);
- SetPlayerPos(playerid, 1544.2941,-1353.6318,329.4738);
- SetPlayerVirtualWorld(playerid, 0);
- ResetPlayerWeapons(playerid);
- return 1;
- }
- if(strcmp("/arena", cmdtext, true) == 0)
- {
- new pname[MAX_PLAYER_NAME]
- new string[256]
- GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
- format(string, sizeof(string), "%s Foi para Arena ( /arena )", pname);
- SendClientMessageToAll(0x0000FFFF, string);
- SetPlayerPos(playerid, 1383.4331,2184.4934,11.0234);
- SetPlayerVirtualWorld(playerid, 0);
- GivePlayerWeapon(playerid, 24, 9999);
- GivePlayerWeapon(playerid, 26, 9999);
- GivePlayerWeapon(playerid, 29, 9999);
- return 1;
- }
- if(strcmp("/lv", cmdtext, true) == 0)
- {
- new pname[MAX_PLAYER_NAME]
- new string[256]
- GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
- format(string, sizeof(string), "%s Foi para Las Venturas ( /lv )", pname);
- SendClientMessageToAll(0x0000FFFF, string);
- SetPlayerPos(playerid, 2027.4448,1007.4595,10.8203);
- SetPlayerVirtualWorld(playerid, 0);
- return 1;
- }
- if(strcmp("/sf", cmdtext, true) == 0)
- {
- new pname[MAX_PLAYER_NAME]
- new string[256]
- GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
- format(string, sizeof(string), "%s Foi para San Fierro ( /sf )", pname);
- SendClientMessageToAll(0x0000FFFF, string);
- SetPlayerPos(playerid, -1481.6797,834.3612,7.1875);
- SetPlayerVirtualWorld(playerid, 0);
- return 1;
- }
- if(strcmp("/ls", cmdtext, true) == 0)
- {
- new pname[MAX_PLAYER_NAME]
- new string[256]
- GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
- format(string, sizeof(string), "%s Foi para Los Santos ( /ls )", pname);
- SendClientMessageToAll(0x0000FFFF, string);
- SetPlayerPos(playerid, 1649.3744,-1009.4433,24.0656);
- SetPlayerVirtualWorld(playerid, 0);
- return 1;
- }
- return 0;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOGLIST) {
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid) < 2000) return SendClientMessage(playerid, COR_Vermelho, "[ERRO]: Você não Tem Dinheiro Suficiente!");
- GivePlayerWeapon(playerid, 4, 1);
- GivePlayerWeapon(playerid, 23, 350);
- GivePlayerWeapon(playerid, 27, 300);
- GivePlayerWeapon(playerid, 28, 400);
- GivePlayerWeapon(playerid, 33, 500);
- SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}[SHOP]:{FFFFFF} Você Comprou o Kit 01 e Gastou R$ 2000!");
- GivePlayerMoney(playerid, -2000);
- }
- case 1:
- {
- if(GetPlayerMoney(playerid) < 4000) return SendClientMessage(playerid, COR_Vermelho, "[ERRO]: Você não Tem Dinheiro Suficiente!");
- GivePlayerWeapon(playerid, 5, 1);
- GivePlayerWeapon(playerid, 24, 250);
- GivePlayerWeapon(playerid, 26, 250);
- GivePlayerWeapon(playerid, 32, 300);
- GivePlayerWeapon(playerid, 31, 350);
- SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}[SHOP]:{FFFFFF} Você Comprou o Kit 02 e Gastou R$ 4000!"); /* Dialog do /kits */
- GivePlayerMoney(playerid, -4000);
- }
- case 2:
- {
- if(GetPlayerMoney(playerid) < 6000) return SendClientMessage(playerid, COR_Vermelho, "[ERRO]: Você não Tem Dinheiro Suficiente!");
- GivePlayerWeapon(playerid, 8, 1);
- GivePlayerWeapon(playerid, 24, 300);
- GivePlayerWeapon(playerid, 25, 300);
- GivePlayerWeapon(playerid, 29, 350);
- GivePlayerWeapon(playerid, 30, 350);
- GivePlayerWeapon(playerid, 34, 450);
- SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}[SHOP]:{FFFFFF} Você Comprou o Kit 03 e Gastou R$ 6000!");
- GivePlayerMoney(playerid, -6000);
- }
- }
- }
- }
- return 1;
- }
- /* Observação : Se Você quiser Utilizar Comandos Para Teleportar com Veículo , Utilize o Seguinte Código :
- if(!strcmp(cmdtext, "//exemplo", true)){
- if(!IsPlayerInAnyVehicle(playerid)){
- SetPlayerPos(playerid, 0.0, 0.0, 0.0);
- SetPlayerFacingAngle(playerid, 0.0);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- }
- else{
- new veh = GetPlayerVehicleID(playerid);
- SetVehiclePos(veh, 0.0, 0.0, 0.0);
- SetVehicleZAngle(veh, 0.0);
- LinkVehicleToInterior(veh, 0);
- SetVehicleVirtualWorld(veh, 0);
- PutPlayerInVehicle(playerid, veh, 0);
- }
- return 1;
- }
- Apenas Mude os Valores para os Do Seu Teleporte !
- Este GM Foi Feito Para Estudos , e Não para Ter Direitos Autorais.
- é Basico Mas Ajuda Bastante quem está iniciando nesta area.*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement