Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This is a comment
- // uncomment the line below if you want to write a filterscript
- #define FILTERSCRIPT
- #include <a_samp>
- #include "../include/gl_common.inc"
- #if defined FILTERSCRIPT
- #define COLOR_LIGHTBLUE 0x91C8FF
- #define COLOR_TEMP 0x33CCFFAA
- #define AzulEscuro 0x2641FEAA
- #define CIDADES 111
- #define MENU 211
- forward count2();
- forward count1();
- forward countgo();
- forward stop();
- new bool:a;
- new Float:X, Float:Y, Float:Z;
- #else
- #endif
- #define TOTAL_ITEMS 207
- #define SELECTION_ITEMS 21
- #define ITEMS_PER_LINE 7
- #define HEADER_TEXT "Carros"
- #define NEXT_TEXT "Next"
- #define PREV_TEXT "Prev"
- #define DIALOG_BASE_X 75.0
- #define DIALOG_BASE_Y 130.0
- #define DIALOG_WIDTH 550.0
- #define DIALOG_HEIGHT 180.0
- #define SPRITE_DIM_X 60.0
- #define SPRITE_DIM_Y 70.0
- new gTotalItems = TOTAL_ITEMS;
- new PlayerText:gCurrentPageTextDrawId[MAX_PLAYERS];
- new PlayerText:gHeaderTextDrawId[MAX_PLAYERS];
- new PlayerText:gBackgroundTextDrawId[MAX_PLAYERS];
- new PlayerText:gNextButtonTextDrawId[MAX_PLAYERS];
- new PlayerText:gPrevButtonTextDrawId[MAX_PLAYERS];
- new PlayerText:gSelectionItems[MAX_PLAYERS][SELECTION_ITEMS];
- new gSelectionItemsTag[MAX_PLAYERS][SELECTION_ITEMS];
- new gItemAt[MAX_PLAYERS];
- new gItemList[TOTAL_ITEMS] = {
- 400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,
- 431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,450,451,452,453,454,455,456,457,458,459,460,461,
- 462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,
- 493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,
- 524,525,526,527,528,529,530,531,532,533,534,535,536,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,
- 555,556,557,558,559,560,561,562,563,564,565,566,567,568,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,
- 586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611
- };
- new str[256];
- //------------------------------------------------
- GetNumberOfPages()
- {
- if((gTotalItems >= SELECTION_ITEMS) && (gTotalItems % SELECTION_ITEMS) == 0)
- {
- return (gTotalItems / SELECTION_ITEMS);
- }
- else return (gTotalItems / SELECTION_ITEMS) + 1;
- }
- //------------------------------------------------
- PlayerText:CreateCurrentPageTextDraw(playerid, Float:Xpos, Float:Ypos)
- {
- new PlayerText:txtInit;
- txtInit = CreatePlayerTextDraw(playerid, Xpos, Ypos, "0/0");
- PlayerTextDrawUseBox(playerid, txtInit, 0);
- PlayerTextDrawLetterSize(playerid, txtInit, 0.4, 1.1);
- PlayerTextDrawFont(playerid, txtInit, 1);
- PlayerTextDrawSetShadow(playerid, txtInit, 0);
- PlayerTextDrawSetOutline(playerid, txtInit, 1);
- PlayerTextDrawColor(playerid, txtInit, 0xACCBF1FF);
- PlayerTextDrawShow(playerid, txtInit);
- return txtInit;
- }
- //------------------------------------------------
- // Creates a button textdraw and returns the textdraw ID.
- PlayerText:CreatePlayerDialogButton(playerid, Float:Xpos, Float:Ypos, Float:Width, Float:Height, button_text[])
- {
- new PlayerText:txtInit;
- txtInit = CreatePlayerTextDraw(playerid, Xpos, Ypos, button_text);
- PlayerTextDrawUseBox(playerid, txtInit, 1);
- PlayerTextDrawBoxColor(playerid, txtInit, 0x000000FF);
- PlayerTextDrawBackgroundColor(playerid, txtInit, 0x000000FF);
- PlayerTextDrawLetterSize(playerid, txtInit, 0.4, 1.1);
- PlayerTextDrawFont(playerid, txtInit, 1);
- PlayerTextDrawSetShadow(playerid, txtInit, 0); // no shadow
- PlayerTextDrawSetOutline(playerid, txtInit, 0);
- PlayerTextDrawColor(playerid, txtInit, 0x4A5A6BFF);
- PlayerTextDrawSetSelectable(playerid, txtInit, 1);
- PlayerTextDrawAlignment(playerid, txtInit, 2);
- PlayerTextDrawTextSize(playerid, txtInit, Height, Width); // The width and height are reversed for centering.. something the game does <g>
- PlayerTextDrawShow(playerid, txtInit);
- return txtInit;
- }
- //------------------------------------------------
- PlayerText:CreatePlayerHeaderTextDraw(playerid, Float:Xpos, Float:Ypos, header_text[])
- {
- new PlayerText:txtInit;
- txtInit = CreatePlayerTextDraw(playerid, Xpos, Ypos, header_text);
- PlayerTextDrawUseBox(playerid, txtInit, 0);
- PlayerTextDrawLetterSize(playerid, txtInit, 1.25, 3.0);
- PlayerTextDrawFont(playerid, txtInit, 0);
- PlayerTextDrawSetShadow(playerid, txtInit, 0);
- PlayerTextDrawSetOutline(playerid, txtInit, 1);
- PlayerTextDrawColor(playerid, txtInit, 0xACCBF1FF);
- PlayerTextDrawShow(playerid, txtInit);
- return txtInit;
- }
- //------------------------------------------------
- PlayerText:CreatePlayerBackgroundTextDraw(playerid, Float:Xpos, Float:Ypos, Float:Width, Float:Height)
- {
- new PlayerText:txtBackground = CreatePlayerTextDraw(playerid, Xpos, Ypos,
- " ~n~"); // enough space for everyone
- PlayerTextDrawUseBox(playerid, txtBackground, 1);
- PlayerTextDrawBoxColor(playerid, txtBackground, 0x00000099);
- PlayerTextDrawLetterSize(playerid, txtBackground, 5.0, 5.0);
- PlayerTextDrawFont(playerid, txtBackground, 0);
- PlayerTextDrawSetShadow(playerid, txtBackground, 0);
- PlayerTextDrawSetOutline(playerid, txtBackground, 0);
- PlayerTextDrawColor(playerid, txtBackground,0x000000FF);
- PlayerTextDrawTextSize(playerid, txtBackground, Width, Height);
- PlayerTextDrawBackgroundColor(playerid, txtBackground, 0x00000099);
- PlayerTextDrawShow(playerid, txtBackground);
- return txtBackground;
- }
- //------------------------------------------------
- // Creates a model preview sprite
- PlayerText:CreateModelPreviewTextDraw(playerid, modelindex, Float:Xpos, Float:Ypos, Float:width, Float:height)
- {
- new PlayerText:txtPlayerSprite = CreatePlayerTextDraw(playerid, Xpos, Ypos, ""); // it has to be set with SetText later
- PlayerTextDrawFont(playerid, txtPlayerSprite, TEXT_DRAW_FONT_MODEL_PREVIEW);
- PlayerTextDrawColor(playerid, txtPlayerSprite, 0xFFFFFFFF);
- PlayerTextDrawBackgroundColor(playerid, txtPlayerSprite, 0x000000EE);
- PlayerTextDrawTextSize(playerid, txtPlayerSprite, width, height); // Text size is the Width:Height
- PlayerTextDrawSetPreviewModel(playerid, txtPlayerSprite, modelindex);
- PlayerTextDrawSetPreviewRot(playerid,txtPlayerSprite, -16.0, 0.0, -55.0);
- PlayerTextDrawSetSelectable(playerid, txtPlayerSprite, 1);
- PlayerTextDrawShow(playerid,txtPlayerSprite);
- return txtPlayerSprite;
- }
- //------------------------------------------------
- DestroyPlayerModelPreviews(playerid)
- {
- new x=0;
- while(x != SELECTION_ITEMS) {
- if(gSelectionItems[playerid][x] != PlayerText:INVALID_TEXT_DRAW) {
- PlayerTextDrawDestroy(playerid, gSelectionItems[playerid][x]);
- gSelectionItems[playerid][x] = PlayerText:INVALID_TEXT_DRAW;
- }
- x++;
- }
- }
- //------------------------------------------------
- ShowPlayerModelPreviews(playerid)
- {
- new x=0;
- new Float:BaseX = DIALOG_BASE_X;
- new Float:BaseY = DIALOG_BASE_Y - (SPRITE_DIM_Y * 0.33); // down a bit
- new linetracker = 0;
- new itemat = GetPVarInt(playerid, "vspawner_page") * SELECTION_ITEMS;
- // Destroy any previous ones created
- DestroyPlayerModelPreviews(playerid);
- while(x != SELECTION_ITEMS && itemat < gTotalItems) {
- if(linetracker == 0) {
- BaseX = DIALOG_BASE_X + 25.0; // in a bit from the box
- BaseY += SPRITE_DIM_Y + 1.0; // move on the Y for the next line
- }
- gSelectionItems[playerid][x] = CreateModelPreviewTextDraw(playerid, gItemList[itemat], BaseX, BaseY, SPRITE_DIM_X, SPRITE_DIM_Y);
- gSelectionItemsTag[playerid][x] = gItemList[itemat];
- BaseX += SPRITE_DIM_X + 1.0; // move on the X for the next sprite
- linetracker++;
- if(linetracker == ITEMS_PER_LINE) linetracker = 0;
- itemat++;
- x++;
- }
- }
- //------------------------------------------------
- UpdatePageTextDraw(playerid)
- {
- new PageText[64+1];
- format(PageText, 64, "%d/%d", GetPVarInt(playerid,"vspawner_page") + 1, GetNumberOfPages());
- PlayerTextDrawSetString(playerid, gCurrentPageTextDrawId[playerid], PageText);
- }
- //------------------------------------------------
- CreateSelectionMenu(playerid)
- {
- gBackgroundTextDrawId[playerid] = CreatePlayerBackgroundTextDraw(playerid, DIALOG_BASE_X, DIALOG_BASE_Y + 20.0, DIALOG_WIDTH, DIALOG_HEIGHT);
- gHeaderTextDrawId[playerid] = CreatePlayerHeaderTextDraw(playerid, DIALOG_BASE_X, DIALOG_BASE_Y, HEADER_TEXT);
- gCurrentPageTextDrawId[playerid] = CreateCurrentPageTextDraw(playerid, DIALOG_WIDTH - 30.0, DIALOG_BASE_Y + 15.0);
- gNextButtonTextDrawId[playerid] = CreatePlayerDialogButton(playerid, DIALOG_WIDTH - 30.0, DIALOG_BASE_Y+DIALOG_HEIGHT+100.0, 50.0, 16.0, NEXT_TEXT);
- gPrevButtonTextDrawId[playerid] = CreatePlayerDialogButton(playerid, DIALOG_WIDTH - 90.0, DIALOG_BASE_Y+DIALOG_HEIGHT+100.0, 50.0, 16.0, PREV_TEXT);
- ShowPlayerModelPreviews(playerid);
- UpdatePageTextDraw(playerid);
- }
- //------------------------------------------------
- DestroySelectionMenu(playerid)
- {
- DestroyPlayerModelPreviews(playerid);
- PlayerTextDrawDestroy(playerid, gHeaderTextDrawId[playerid]);
- PlayerTextDrawDestroy(playerid, gBackgroundTextDrawId[playerid]);
- PlayerTextDrawDestroy(playerid, gCurrentPageTextDrawId[playerid]);
- PlayerTextDrawDestroy(playerid, gNextButtonTextDrawId[playerid]);
- PlayerTextDrawDestroy(playerid, gPrevButtonTextDrawId[playerid]);
- gHeaderTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
- gBackgroundTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
- gCurrentPageTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
- gNextButtonTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
- gPrevButtonTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
- }
- //------------------------------------------------
- SpawnVehicle_InfrontOfPlayer(playerid, vehiclemodel, color1, color2)
- {
- new Float:x,Float:y,Float:z;
- new Float:facing;
- new Float:distance;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerFacingAngle(playerid, facing);
- new Float:size_x,Float:size_y,Float:size_z;
- GetVehicleModelInfo(vehiclemodel, VEHICLE_MODEL_INFO_SIZE, size_x, size_y, size_z);
- distance = size_x + 0.5;
- x += (distance * floatsin(-facing, degrees));
- y += (distance * floatcos(-facing, degrees));
- facing += 90.0;
- if(facing > 360.0) facing -= 360.0;
- return CreateVehicle(vehiclemodel, x, y, z + (size_z * 0.25), facing, color1, color2, -1);
- }
- //------------------------------------------------
- HandlePlayerItemSelection(playerid, selecteditem)
- {
- // In this case we're spawning a vehicle for them
- SpawnVehicle_InfrontOfPlayer(playerid, gSelectionItemsTag[playerid][selecteditem], -1, -1);
- }
- //------------------------------------------------
- public OnPlayerConnect(playerid)
- {
- // Init all of the textdraw related globals
- gHeaderTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
- gBackgroundTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
- gCurrentPageTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
- gNextButtonTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
- gPrevButtonTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
- for(new x=0; x < SELECTION_ITEMS; x++) {
- gSelectionItems[playerid][x] = PlayerText:INVALID_TEXT_DRAW;
- }
- gItemAt[playerid] = 0;
- return 1; // Allow other scripts to keep processing OnPlayerConnect
- }
- //-------------------------------------------
- // Even though only Player* textdraws are used in this script,
- // OnPlayerClickTextDraw is still required to handle ESC
- public OnPlayerClickTextDraw(playerid, Text:clickedid)
- {
- if(GetPVarInt(playerid, "vspawner_active") == 0) return 0;
- // Handle: They cancelled (with ESC)
- if(clickedid == Text:INVALID_TEXT_DRAW) {
- DestroySelectionMenu(playerid);
- SetPVarInt(playerid, "vspawner_active", 0);
- PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
- return 1;
- }
- return 0;
- }
- //------------------------------------------------
- public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
- {
- if(GetPVarInt(playerid, "vspawner_active") == 0) return 0;
- new curpage = GetPVarInt(playerid, "vspawner_page");
- // Handle: next button
- if(playertextid == gNextButtonTextDrawId[playerid]) {
- if(curpage < (GetNumberOfPages() - 1)) {
- SetPVarInt(playerid, "vspawner_page", curpage + 1);
- ShowPlayerModelPreviews(playerid);
- UpdatePageTextDraw(playerid);
- PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0);
- } else {
- PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
- }
- return 1;
- }
- // Handle: previous button
- if(playertextid == gPrevButtonTextDrawId[playerid]) {
- if(curpage > 0) {
- SetPVarInt(playerid, "vspawner_page", curpage - 1);
- ShowPlayerModelPreviews(playerid);
- UpdatePageTextDraw(playerid);
- PlayerPlaySound(playerid, 1084, 0.0, 0.0, 0.0);
- } else {
- PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
- }
- return 1;
- }
- // Search in the array of textdraws used for the items
- new x=0;
- while(x != SELECTION_ITEMS) {
- if(playertextid == gSelectionItems[playerid][x]) {
- HandlePlayerItemSelection(playerid, x);
- PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0);
- DestroySelectionMenu(playerid);
- CancelSelectTextDraw(playerid);
- SetPVarInt(playerid, "vspawner_active", 0);
- return 1;
- }
- x++;
- }
- return 0;
- }
- //------------------------------------------------
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- //////////////////
- // ir ///
- //////////////////
- new cmd[256+1];
- new idx;
- //if(!IsPlayerAdmin(playerid)) return 0;
- cmd = strtok(cmdtext, idx);
- if(strcmp("/veiculos", cmd, true) == 0)
- {
- // If there was a previously created selection menu, destroy it
- DestroySelectionMenu(playerid);
- SetPVarInt(playerid, "vspawner_active", 1);
- //SetPVarInt(playerid, "vspawner_page", 0); // will reset the page back to the first
- CreateSelectionMenu(playerid);
- SelectTextDraw(playerid, 0xACCBF1FF);
- return 1;
- }
- //////////////////
- // limparchat ///
- //////////////////
- if(strcmp(cmdtext, "/descapotar", true) == 0)
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- new currentveh;
- new Float:angle;
- currentveh = GetPlayerVehicleID(playerid);
- GetVehicleZAngle(currentveh, angle);
- SetVehicleZAngle(currentveh, angle);
- SendClientMessage(playerid, 0xFFFFFFFF, "Descapotado!.");
- return 1;
- }
- else
- {
- SendClientMessage(playerid, 0xFFFFFFFF, "Só funciona dentro de um veículo cara!");
- return 1;
- }
- }
- //////////////////
- // limparchat ///
- //////////////////
- if(strcmp(cmdtext, "/limparchat", true) == 0) {
- if(!IsPlayerAdmin(playerid))
- {
- SendClientMessage(playerid,COLOR_TEMP,"{FF0000}| FAIL | {FFFFFF}Desculpe, apenas os administradores podem usar esse comando!");
- return 1;
- }
- for(new i = 0; i < 200; i++)// 200 Linhas que será apagadas...
- SendClientMessageToAll(COLOR_TEMP, "");
- SendClientMessageToAll(AzulEscuro, "{1874CD}| INFO | {FFFFFF}O administrador limpou o chat!");
- return 1;
- }
- //////////////////
- // TELEPORTES ///
- //////////////////
- if(!strcmp("/teleportes", cmdtext, true)) // Comando
- {
- ShowPlayerDialog(playerid, CIDADES, DIALOG_STYLE_LIST, "{33CCFF}TELEPORTES{ffffFF}", "Los Santos\nSan Fierro\nLas Venturas\nBlueberry\nChilliad\nAeroporto SF\nAeroporto LS\nAeroporto LV\nAeroporto AB\nDesafio\nSalto Radical\nPista OffRoad\nInicio", "Teleportar", "Cancelar");
- return 1;
- }
- //////////////////
- // MENU ///
- //////////////////
- if(!strcmp("/menu", cmdtext, true)) // Comando
- {
- ShowPlayerDialog(playerid, MENU, DIALOG_STYLE_LIST, "{33CCFF}MENU{ffffFF}", "Morrer\nVida\nColete\nJetPack\nGrana", "Pegar", "Cancelar");
- //morrer
- //vida
- //colete
- //JetPk
- return 1;
- }
- //////////////////
- //// consertar/////
- //////////////////
- if (!strcmp("/consertar", cmdtext))
- {
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF, "You are not in a vehicle!");
- RepairVehicle(GetPlayerVehicleID(playerid));
- SendClientMessage(playerid, 0xFFFFFFFF, "Your vehicle has been successfully repaired!");
- return 1;
- }
- //////////////////
- //// concertar/////
- //////////////////
- if (!strcmp("/concertar", cmdtext))
- {
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF, "You are not in a vehicle!");
- RepairVehicle(GetPlayerVehicleID(playerid));
- SendClientMessage(playerid, 0xFFFFFFFF, "Your vehicle has been successfully repaired!");
- return 1;
- }
- //////////////////
- //// COMANDOS/////
- //////////////////
- if(strcmp(cmdtext,"/comandos",true)==0) {
- new comandos[400];
- strins(comandos,"\n",strlen(comandos));
- strins(comandos,"/veiculos \n",strlen(comandos));
- strins(comandos,"/mudarskin \n",strlen(comandos));
- strins(comandos,"/consertar \n",strlen(comandos));
- strins(comandos,"/teleportes \n",strlen(comandos));
- strins(comandos,"/tunar \n",strlen(comandos));
- strins(comandos,"/menuarmas \n",strlen(comandos));
- strins(comandos,"/ir \n",strlen(comandos));
- strins(comandos,"/count \n",strlen(comandos));
- strins(comandos,"/descapotar \n",strlen(comandos));
- strins(comandos,"/salvar e /voltar \n",strlen(comandos));
- strins(comandos,"\n",strlen(comandos));
- ShowPlayerDialog(playerid, 1235, DIALOG_STYLE_MSGBOX, "COMANDOS:",comandos, "Sair");
- // Iremos Ver La No Final =)
- return 1;
- }
- //////////////////
- //// CONTAGEM/////
- //////////////////
- if(strcmp(cmdtext,"/count",true) == 0) {
- new pName[30];
- new string[256];
- if (a == false)
- {
- a = true;
- GetPlayerName(playerid, pName, 30);
- format(string, 280, "[INFO]:%s Iniciou uma contagem!!!!.", pName);
- SendClientMessageToAll(COLOR_LIGHTBLUE, string);
- for(new i; i < MAX_PLAYERS; i++) {
- GameTextForPlayer(i, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~-~y~ 3 ~g~-",1000,4);
- GetPlayerPos(i,X,Y,Z);
- PlayerPlaySound(i,1056,X,Y,Z);
- }
- SetTimer("count2",1000,0);
- SetTimer("count1",2000,0);
- SetTimer("countgo",3000,0);
- SetTimer("stop",6000,0);
- }
- else SendClientMessage(playerid, 0xFF9900AA, "[INFO]:Prepare-se!!!.");
- return 1;
- }
- return 1;
- }
- ////////////////////////////////////////////////////////////////////////////////
- public count2()
- {
- for(new i; i < MAX_PLAYERS; i++) {
- GameTextForPlayer(i,"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~-~y~ 2 ~g~-",1000,4);
- GetPlayerPos(i,X,Y,Z);
- PlayerPlaySound(i,1056,X,Y,Z);
- }
- }
- ////////////////////////////////////////////////////////////////////////////////
- public count1()
- {
- for(new i; i < MAX_PLAYERS; i++) {
- GameTextForPlayer(i,"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~-~y~ 1 ~g~-",1000,4);
- GetPlayerPos(i,X,Y,Z);
- PlayerPlaySound(i,1056,X,Y,Z);
- }
- }
- ////////////////////////////////////////////////////////////////////////////////
- public countgo()
- {
- for(new i; i < MAX_PLAYERS; i++) {
- GetPlayerPos(i,X,Y,Z);
- GameTextForPlayer(i,"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~-~y~]~g~-~g~GO GO GO~g~-~y~]~g~-",1000,4);
- PlayerPlaySound(i,1057,X,Y,Z);
- }
- }
- public stop()
- {
- a = false;
- }
- ///////////////////////
- // DIALOGS //
- ///////////////////////
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) // No OnDialogResponse !!!
- {
- ///////////////////////
- // CIDADES //
- ///////////////////////
- /*
- 1=ls
- 2=sf
- 3=lv
- 4=Blueberry
- 5=Chilliad
- 6=aerosf
- 7=aerols
- 8=aerolv
- 9=aeroab
- 10=desafio
- 11=inicio
- */
- if(dialogid == CIDADES) // AO DIGITAR /meudialoglist IRA ABRIR :
- {
- if(response)
- {
- if(listitem == 0) // LISTA 1 OU SEJA - JFS -
- {
- // Coloque Sua Função Aqui !!
- // VAMO POR UM SIMPLES AQUI EM BAIXO, :
- SetPlayerPos(playerid, 1463.4583,-885.8461,55.9425); // CODERNADA ONDE ELE VAI
- }
- else if(listitem == 1) // LISTA 2 OU SEJA - JONATHAN -
- {
- // Coloque Sua Função Aqui !!
- // VAMO POR UM SIMPLES AQUI EM BAIXO, :
- SetPlayerPos(playerid, -2023.2820,178.6381,28.8359); // CODERNADA ONDE ELE VAI
- }
- else if(listitem == 2) // LISTA 2 OU SEJA - JONATHAN -
- {
- // Coloque Sua Função Aqui !!
- // VAMO POR UM SIMPLES AQUI EM BAIXO, :
- SetPlayerPos(playerid, 2119.3572,1024.7743,10.8203); // CODERNADA ONDE ELE VAI
- }
- else if(listitem == 3) // LISTA 2 OU SEJA - JONATHAN -
- {
- // Coloque Sua Função Aqui !!
- // VAMO POR UM SIMPLES AQUI EM BAIXO, :
- SetPlayerPos(playerid, 377.3415,-135.6752,3.3761); // CODERNADA ONDE ELE VAI
- }
- else if(listitem == 4) // LISTA 2 OU SEJA - JONATHAN -
- {
- // Coloque Sua Função Aqui !!
- // VAMO POR UM SIMPLES AQUI EM BAIXO, :
- SetPlayerPos(playerid, -2390.6624,-2204.3618,33.2891); // CODERNADA ONDE ELE VAI
- }
- else if(listitem == 5) // LISTA 2 OU SEJA - JONATHAN -
- {
- // Coloque Sua Função Aqui !!
- // VAMO POR UM SIMPLES AQUI EM BAIXO, :
- SetPlayerPos(playerid, -1206.6509,44.6323,14.1428); // CODERNADA ONDE ELE VAI
- }
- else if(listitem == 6) // LISTA 2 OU SEJA - JONATHAN -
- {
- // Coloque Sua Função Aqui !!
- // VAMO POR UM SIMPLES AQUI EM BAIXO, :
- SetPlayerPos(playerid, 1974.8517,-2267.0110,13.5469); // CODERNADA ONDE ELE VAI
- }
- else if(listitem == 7) // LISTA 2 OU SEJA - JONATHAN -
- {
- // Coloque Sua Função Aqui !!
- // VAMO POR UM SIMPLES AQUI EM BAIXO, :
- SetPlayerPos(playerid, 1726.9647,1611.5157,10.0397); // CODERNADA ONDE ELE VAI
- }
- else if(listitem == 8) // LISTA 2 OU SEJA - JONATHAN -
- {
- // Coloque Sua Função Aqui !!
- // VAMO POR UM SIMPLES AQUI EM BAIXO, :
- SetPlayerPos(playerid, 1726.9647,1611.5157,10.0397); // CODERNADA ONDE ELE VAI
- }
- else if(listitem == 9) // LISTA 2 OU SEJA - JONATHAN -
- {
- // Coloque Sua Função Aqui !!
- // VAMO POR UM SIMPLES AQUI EM BAIXO, :
- SetPlayerPos(playerid, -1998.2328,-247.4197,35.8067); //
- //CreateObject(2896,-2382.8999000,-1657.1999500,2279.6999500,0.0000000,0.0000000,0.0000000); //object(casket_law) (1)
- }
- else if(listitem == 10) // LISTA 2 OU SEJA - JONATHAN -
- {
- // Coloque Sua Função Aqui !!
- // VAMO POR UM SIMPLES AQUI EM BAIXO, :
- SetPlayerPos(playerid, -2382.8999000,-1657.1999500,2279.6999500); //
- }
- else if(listitem == 11) // LISTA 2 OU SEJA - JONATHAN -
- {
- // Coloque Sua Função Aqui !!
- // VAMO POR UM SIMPLES AQUI EM BAIXO, :
- SetPlayerPos(playerid, -2818.0000000,2914.1001000,25.4000000); //
- }
- else if(listitem == 12) // LISTA 2 OU SEJA - JONATHAN -
- {
- // Coloque Sua Função Aqui !!
- // VAMO POR UM SIMPLES AQUI EM BAIXO, :
- SetPlayerPos(playerid, 102.0953,1106.4053,13.6094); // CODERNADA ONDE ELE VAI
- return 1;
- }
- }
- }
- ///////////////////////
- //// MENU ///////
- //////////////////////
- //morrer
- //vida
- //colete
- //JetPk
- //grana
- if(dialogid == MENU)
- {
- if(response)
- {
- if(listitem == 0)
- {
- SetPlayerHealth(playerid,0);
- }
- else if(listitem == 1)
- {
- SetPlayerHealth(playerid, 100.0);
- }
- else if(listitem == 2)
- {
- SetPlayerArmour(playerid, 100.0);
- }
- else if(listitem == 3) // LISTA 2 OU SEJA - JONATHAN -
- {
- SetPlayerSpecialAction(playerid, 2); // JETPACK
- }
- else if(listitem == 4) // LISTA 2 OU SEJA - JONATHAN -
- {
- GivePlayerMoney(playerid, 100000);
- return 1;
- }
- }
- }
- ///////////////////////
- //// FIM ///////
- //////////////////////
- return 0;
- }
- // Fechando o OnDialogResponse
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement