24.05.2010, 01:44
Olб, sou iniciante e tenho algumas dъvidas.
Para aprender a codar estou fazendo um GM de TDM, nesse GM eu fiz Check Point nas HQ's das Gangs, nesse Check Point abre uma caixa de dialogo ontem hб 3 opзхes, 'Armas, vida, colete'
Atй ai tudo bem..
fui inventar de fazer um comando /ajuda onde apareceria 'Comandos, Territуrio, Dinheiro'
Faзo tudo certo, Mas quando eu digito /ajuda in-game ele apenas aparece a caixa de dialogo escrito 'Comandos, Territуrio, Dinheiro' Mas quando eu seleciono qualquer um nгo funciona
public OnPlayerEnterCheckpoint(playerid)
Comando /ajuda
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
Outro problema que ocorre й que quando eu vou no jogo e vou hб um Check Point, seleciono a opзгo 'Colete' eu ganho o colete mas abre uma caixa de dialogo com o comando /ajuda 'Dinheiro' 
Como jб disse, sou novo, estou aprendendo e esse й o meu primeiro GM, estou criando ele do zero, nгo estou editando.
Sera que alguйm pode me ajudar?
Obrigado.
PS: Se postei na бrea errada desculpe-me, sou novo no fуrum tambйm.
Para aprender a codar estou fazendo um GM de TDM, nesse GM eu fiz Check Point nas HQ's das Gangs, nesse Check Point abre uma caixa de dialogo ontem hб 3 opзхes, 'Armas, vida, colete'
Atй ai tudo bem..
fui inventar de fazer um comando /ajuda onde apareceria 'Comandos, Territуrio, Dinheiro'
Faзo tudo certo, Mas quando eu digito /ajuda in-game ele apenas aparece a caixa de dialogo escrito 'Comandos, Territуrio, Dinheiro' Mas quando eu seleciono qualquer um nгo funciona

public OnPlayerEnterCheckpoint(playerid)
Код:
public OnPlayerEnterCheckpoint(playerid)
{
if(CPS_IsPlayerInCheckpoint(playerid, cpgroove))
{
SendClientMessage(playerid, AZUL, "Selecione os seus equipamentos");
ShowPlayerDialog(playerid,DIALOG_1,DIALOG_STYLE_LIST,"Selecione o que vocк deseja","Armas \nVida \nColete","Pronto","Cancelar");
}
if(CPS_IsPlayerInCheckpoint(playerid, cpaztecas))
{
SendClientMessage(playerid, AZUL, "Selecione os seus equipamentos");
ShowPlayerDialog(playerid,DIALOG_1,DIALOG_STYLE_LIST,"Selecione o que vocк deseja","Armas \nVida \nColete","Pronto","Cancelar");
}
if(CPS_IsPlayerInCheckpoint(playerid, cpvagos))
{
SendClientMessage(playerid, AZUL, "Selecione os seus equipamentos");
ShowPlayerDialog(playerid,DIALOG_1,DIALOG_STYLE_LIST,"Selecione o que vocк deseja","Armas \nVida \nColete","Pronto","Cancelar");
}
if(CPS_IsPlayerInCheckpoint(playerid, cpcv))
{
SendClientMessage(playerid, AZUL, "Selecione os seus equipamentos");
ShowPlayerDialog(playerid,DIALOG_1,DIALOG_STYLE_LIST,"Selecione o que vocк deseja","Armas \nVida \nColete","Pronto","Cancelar");
}
if(CPS_IsPlayerInCheckpoint(playerid, cppm))
{
SendClientMessage(playerid, AZUL, "Selecione os seus equipamentos");
ShowPlayerDialog(playerid,DIALOG_1,DIALOG_STYLE_LIST,"Selecione o que vocк deseja","Armas \nVida \nColete","Pronto","Cancelar");
}
return 1;
}
Код:
if(strcmp(cmd, "/ajuda", true) == 0)
{
ShowPlayerDialog(playerid,DIALOG_2,DIALOG_STYLE_LIST,"Ajuda","Comandos \nTerritуrio \nDinheiro","Confirmar","Cancelar");
}
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_1)
{
if(response)
{
if(listitem == 0)
{
GivePlayerWeapon(playerid, 24, 999);
GivePlayerWeapon(playerid, 16, 1);
GivePlayerWeapon(playerid, 34, 999);
GivePlayerWeapon(playerid, 31, 999);
GivePlayerWeapon(playerid, 32, 999);
}
if(listitem == 1)
{
SetPlayerHealth(playerid, 100);
}
if(listitem == 2)
{
SetPlayerArmour(playerid, 100);
}
}
if(dialogid == DIALOG_2)
{
if(response)
{
if(listitem == 0)
ShowPlayerDialog(playerid,2,DIALOG_STYLE_LIST,"Comandos","/pg Abre portao da Groove \n/pa Abre portao dos Aztecas \n/pc Abre portao do Comando Vermelho \n/pv Abre portao dos Vagos \n/pm Abre portao da PM","Pronto","Cancelar");
}
if(listitem == 1)
ShowPlayerDialog(playerid,2,DIALOG_STYLE_LIST,"Territorio","Em desenvolvimento","Pronto","Cancelar");
}
if(listitem ==2)
ShowPlayerDialog(playerid,2,DIALOG_STYLE_LIST,"Dinheiro","Em desenvolvimento","Pronto","Cancelar");
}
}

Como jб disse, sou novo, estou aprendendo e esse й o meu primeiro GM, estou criando ele do zero, nгo estou editando.
Sera que alguйm pode me ajudar?
Obrigado.
PS: Se postei na бrea errada desculpe-me, sou novo no fуrum tambйm.



(se nгo quiser passar eu entendendo
)
