hook OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == 65536)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 2246.77, -1666.12, 15.47, 11.57)) // Jessica binco
{
ShowPlayerDialog(playerid, D_AJUDAJESSICA, DIALOG_STYLE_LIST, "Jessica Gerente", "{04FF29}Informaзхes da loja\n{04FF29}Trabalha aqui?\n{04FF29}O que posso comprar aqui?\n{04FF29}Vocкs tem parceria com quem?\n{04FF29}Onde posso encontrar Liam?", "Ver", "Sair");
return 1;
}
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 2128.33, -1785.47,13.55)) // James pizzaria
{
ShowPlayerDialog(playerid, D_AJUDAJAMES, DIALOG_STYLE_LIST, "James Gerente", "{04FF29}Informaзхes do fast food\n{04FF29}Trabalha aqui?\n{04FF29}Sabe alguma informaзгo do dono?\n{04FF29}Quantas propriedades ele tem?\n{04FF29}Posso entrar em contato com ele?", "Ver", "Sair");
return 1;
}
}
}
}
hook OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == D_AJUDAJESSICA) //
if(response)
{
new stg[3000]; // {00EAF6} << Azul
if(listitem == 0) //
{
strcat(stg, "\t{04FF29}TEXTO REMOVIDO\n");
strcat(stg, "\t{04FF29}TEXTO REMOVIDO\n");
ShowPlayerDialog(playerid, D_AJUDAJESSICA, DIALOG_STYLE_MSGBOX, "Jessica", stg, "OK", "");
// return 1;
}
if(listitem == 1) //
{
strcat(stg, "\t{04FF29}TEXTO REMOVIDO\n");
strcat(stg, "\t{04FF29}TEXTO REMOVIDO\n");
ShowPlayerDialog(playerid, D_AJUDAJESSICA, DIALOG_STYLE_MSGBOX, "Jessica", stg, "OK", "");
//return 1;
}
if(listitem == 2) //
{
strcat(stg, "\t{04FF29}TEXTO REMOVIDO\n");
ShowPlayerDialog(playerid, D_AJUDAJESSICA, DIALOG_STYLE_MSGBOX, "Jessica", stg, "OK", "");
// return 1;
}
if(listitem == 3) //
{
strcat(stg, "\t{04FF29}TEXTO REMOVIDO\n");
strcat(stg, "\t{04FF29}TEXTO REMOVIDO\n");
strcat(stg, "\t{04FF29}TEXTO REMOVIDO\n");
ShowPlayerDialog(playerid, D_AJUDAJESSICA, DIALOG_STYLE_MSGBOX, "Jessica", stg, "OK", "");
// return 1;
}
if(listitem == 4) //
{
strcat(stg, "\t{04FF29}TEXTO REMOVIDO\n");
strcat(stg, "\t{04FF29}TEXTO REMOVIDO\n");
strcat(stg, "\t{04FF29}TEXTO REMOVIDO\n");
ShowPlayerDialog(playerid, D_AJUDAJESSICA, DIALOG_STYLE_MSGBOX, "Jessica", stg, "OK", "");
return 1;
}
if(dialogid == D_AJUDAJAMES) //
if(response)
{
new stgjames[3000]; // {00EAF6} << Azul
if(listitem == 0) //
{
strcat(stgjames, "\t{04FF29}TEXTO REMOVIDO\n");
strcat(stgjames, "\t{04FF29}TEXTO REMOVIDO\n");
strcat(stgjames, "\t{04FF29}TTEXTO REMOVIDO\n");
ShowPlayerDialog(playerid, D_AJUDAJAMES, DIALOG_STYLE_MSGBOX, "James", stgjames, "OK", "");
return 1;
}
if(listitem == 1) //
{
strcat(stgjames, "\t{04FF29}TEXTO REMOVIDO\n");
strcat(stgjames, "\t{04FF29}TEXTO REMOVIDO\n");
strcat(stgjames, "\t{04FF29}TEXTO REMOVIDO\n");
ShowPlayerDialog(playerid, D_AJUDAJAMES, DIALOG_STYLE_MSGBOX, "James", stgjames, "OK", "");
return 1;
}
if(listitem == 2)
{
strcat(stgjames, "\t{04FF29}TEXTO REMOVIDO\n");
strcat(stgjames, "\t{04FF29}TEXTO REMOVIDO\n");
strcat(stgjames, "\t{04FF29}TEXTO REMOVIDO\n");
strcat(stgjames, "\t{04FF29}TEXTO REMOVIDO\n");
strcat(stgjames, "\t{04FF29}TEXTO REMOVIDO\n");
ShowPlayerDialog(playerid, D_AJUDAJAMES, DIALOG_STYLE_MSGBOX, "James", stgjames, "OK", "");
return 1;
}
if(listitem == 3) //
{
strcat(stgjames, "\t{04FF29}TEXTO REMOVIDO\n");
ShowPlayerDialog(playerid, D_AJUDAJAMES, DIALOG_STYLE_MSGBOX, "James", stgjames, "OK", "");
return 1;
}
if(listitem == 4) //
{
strcat(stgjames, "\t{04FF29}TEXTO REMOVIDO\n");
ShowPlayerDialog(playerid, D_AJUDAJAMES, DIALOG_STYLE_MSGBOX, "James", stgjames, "OK", "");
return 1;
}
}
}
}
hook OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_YES){
if(IsPlayerInRangeOfPoint(playerid, 2.0, 2246.77, -1666.12, 15.47, 11.57))
ShowPlayerDialog(playerid, D_AJUDAJESSICA, DIALOG_STYLE_LIST, "Jessica Gerente", "{04FF29}Informaзхes da loja\n{04FF29}Trabalha aqui?\n{04FF29}O que posso comprar aqui?\n{04FF29}Vocкs tem parceria com quem?\n{04FF29}Onde posso encontrar Liam?", "Ver", "Sair");
if(IsPlayerInRangeOfPoint(playerid, 2.0, 2128.33, -1785.47,13.55)) // James pizzaria
ShowPlayerDialog(playerid, D_AJUDAJAMES, DIALOG_STYLE_LIST, "James Gerente", "{04FF29}Informaзхes do fast food\n{04FF29}Trabalha aqui?\n{04FF29}Sabe alguma informaзгo do dono?\n{04FF29}Quantas propriedades ele tem?\n{04FF29}Posso entrar em contato com ele?", "Ver", "Sair");
}
}
hook OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new stg[3000];// 3000 ? entгo tб nй
switch(dialogid){
case D_AJUDAJESSICA:{
if(response){
switch(listitem)
{
case 0:{
strcat(stg, "\t{04FF29}TEXTO REMOVIDO\n");
strcat(stg, "\t{04FF29}TEXTO REMOVIDO\n");
}
case 1:{
strcat(stg, "\t{04FF29}TEXTO REMOVIDO\n");
strcat(stg, "\t{04FF29}TEXTO REMOVIDO\n");
}
case 2:{
strcat(stg, "\t{04FF29}TEXTO REMOVIDO\n");
}
case 3:{
strcat(stg, "\t{04FF29}TEXTO REMOVIDO\n");
strcat(stg, "\t{04FF29}TEXTO REMOVIDO\n");
strcat(stg, "\t{04FF29}TEXTO REMOVIDO\n");
}
case 4:{
strcat(stg, "\t{04FF29}TEXTO REMOVIDO\n");
strcat(stg, "\t{04FF29}TEXTO REMOVIDO\n");
strcat(stg, "\t{04FF29}TEXTO REMOVIDO\n");
}
}
ShowPlayerDialog(playerid, D_AJUDAJESSICA, DIALOG_STYLE_MSGBOX, "Jessica", stg, "OK", "");
}
}
case D_AJUDAJAMES:{
if(response){
switch(listitem)
{
case 0:{
strcat(stgjames, "\t{04FF29}TEXTO REMOVIDO\n");
strcat(stgjames, "\t{04FF29}TEXTO REMOVIDO\n");
strcat(stgjames, "\t{04FF29}TTEXTO REMOVIDO\n");
}
case 1:{
strcat(stgjames, "\t{04FF29}TEXTO REMOVIDO\n");
strcat(stgjames, "\t{04FF29}TEXTO REMOVIDO\n");
strcat(stgjames, "\t{04FF29}TEXTO REMOVIDO\n");
}
case 2:{
strcat(stgjames, "\t{04FF29}TEXTO REMOVIDO\n");
strcat(stgjames, "\t{04FF29}TEXTO REMOVIDO\n");
strcat(stgjames, "\t{04FF29}TEXTO REMOVIDO\n");
strcat(stgjames, "\t{04FF29}TEXTO REMOVIDO\n");
strcat(stgjames, "\t{04FF29}TEXTO REMOVIDO\n");
}
case 3:{
strcat(stgjames, "\t{04FF29}TEXTO REMOVIDO\n");
}
case 4:{
strcat(stgjames, "\t{04FF29}TEXTO REMOVIDO\n");
}
}
ShowPlayerDialog(playerid, D_AJUDAJAMES, DIALOG_STYLE_MSGBOX, "James", stgjames, "OK", "");
}
}
//...
}
return 1;
}
new stg[3000]; |
Muito obrigado a vocкs por me ajudarem, e sobre organizar o cуdigo rs, eu geralmente programo uns dois / trкs arquivos, depois passo organizando tudo. Mais confesso que nгo sei se conseguiria organizar dessa maneira que vocк organizou StarOver de fato sumiu alguns Warnings ... e sobre o
Geralmente eu coloco um valor alto e vou escrevendo, quando fica pronto entro no jogo e testo, e depois vou diminuindo o valor do stg para ficar certo ... pois pelo que entendi o new stg[3000] й o tanto de letras e espaзos que serгo dadas no texto correto? e mais uma duvida, percebi que nas chaves vocк nгo deixa elas todas retas na hora de abrir nem de fechar. { { { { } } } } Basicamente formando isso, claro q com o cуdigo entre elas e tals, Por que? achei q teria q fechar todas retas ... Sorry as perguntas, acabo sendo bem curioso e perguntando muito em questгo de programaзгo kk mais uma coisa .. o if(newkeys == 65536) > й a mesma coisa que if(newkeys & KEY_YES) pelo jeito neh |