30.10.2012, 17:34
Bom galera,eu to montando um GPS aqui e to tendo um probleminha.
Abre o primeiro dialog pra escolher 2 opзхes,quando ele escolhe a primeira,abre vбrios lugares pra ele selecionar.
Mas quando ele seleciona o local a ser marcado,ele simplesmente nгo marca e nгo to conseguindo achar meu erro =s
Onde tб errado pra nao apareзer o checkpoint ?
Abre o primeiro dialog pra escolher 2 opзхes,quando ele escolhe a primeira,abre vбrios lugares pra ele selecionar.
Mas quando ele seleciona o local a ser marcado,ele simplesmente nгo marca e nгo to conseguindo achar meu erro =s
Код:
#define gps 1 #define gpslugar 2 #define COR_GPS 0xF27900AA public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/gps", cmdtext, true, 10) == 0) { SendClientMessage(playerid, COR_GPS, " Vocк Abriu o gps! "); // Mensagem return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "GPS", "Locais Em geral\nHQ'S", "Selecionar", "Cancelar"); } return 0; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == gps) { if(response == gps) { if(listitem == 0) { ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "GPS", "Departamento Policial\nPrefeitura\nLoja de armas\nHospital\nPosto de gasolina \nPosto de gasolina 2\nSupermercado\nAeroporto\nEstacionamento Vip", "Selecionar", "Cancelar"); return 1; } if(listitem == 1) { SendClientMessage(playerid,COR_GPS , "Em construзгo !"); return 1; } } } if(dialogid == 2) { if(response == 2) { if(listitem == 0) { SetPlayerCheckpoint(playerid, 1538.2230,-1672.9064,13.5469, 10.0); SendClientMessage(playerid,COR_GPS , "O Departamento Policial foi marcado No mapa,siga atй o ponto vermelho!"); return 1; } if(listitem == 1) { SetPlayerCheckpoint(playerid, 1489.8495,-1741.9192,13.5469, 10.0); SendClientMessage(playerid,COR_GPS , "A Prefeitura foi marcada No mapa,siga atй o ponto vermelho!"); return 1; } if(listitem == 2) { SetPlayerCheckpoint(playerid, 1289.4181,-1654.4293,13.5469, 10.0); SendClientMessage(playerid,COR_GPS , "A Loja de armas 1 foi marcada No mapa,siga atй o ponto vermelho!"); return 1; } if(listitem == 3) { SetPlayerCheckpoint(playerid, 1189.8066,-1330.8704,13.5686, 10.0); SendClientMessage(playerid,COR_GPS , "O Hospital foi marcado No mapa,siga atй o ponto vermelho!"); return 1; } if(listitem == 4) { SetPlayerCheckpoint(playerid, 1938.4954,-1773.0072,13.3828, 10.0); SendClientMessage(playerid,COR_GPS , "O Posto de gasolina foi marcado No mapa,siga atй o ponto vermelho!"); return 1; } if(listitem == 5) { SetPlayerCheckpoint(playerid, 1005.7554,-939.2330,42.1797, 10.0); SendClientMessage(playerid,COR_GPS , "O Posto de gasolina foi marcado No mapa,siga atй o ponto vermelho!"); return 1; } if(listitem == 6) { SetPlayerCheckpoint(playerid, 2000.9990,-1607.9810,13.4679, 10.0); SendClientMessage(playerid,COR_GPS , "O Supermercado foi marcado No mapa,siga atй o ponto vermelho!"); return 1; } if(listitem == 7) { SetPlayerCheckpoint(playerid, 1960.0422,-2189.4854,13.5469, 10.0); SendClientMessage(playerid,COR_GPS , "O Aeroporto de Los Santos foi marcado No mapa,siga atй o ponto vermelho!"); return 1; } if(listitem == 8) { SetPlayerCheckpoint(playerid, 1637.6593,-1140.6218,23.9063, 10.0); SendClientMessage(playerid,COR_GPS , "O Estacionamento VIP foi marcado No mapa,siga atй o ponto vermelho!"); return 1; } } } return 1; }