Problema intalnita (descriere):Salut, am problema cu un dialog, cand scriu comanda : "/buylicenses" apare dialogul,dar cand dau de exemplu pe Flying , nu se intampla nimic , nu imi da nici licenta , nu imi ia nici banii , nu apare nici mesajul.. si nu inteleg..cred ca am uitat ceva ..sper sa ma ajutati voi Ero(area / rile) / warning-(ul / urile):- Liniile de cod / sursa / script-ul(obligatoriu):
#define buylicenses 290198
if(strcmp("/buylicenses", cmdtext, true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerToPoint(3.0,playerid,1617.2471,-1741.3779,500.377))
{
ShowPlayerDialog(playerid, 290198, DIALOG_STYLE_LIST, "BlackUnion Licenses", "Flying\nSailing\nWeapon\nFishing", "Ok", "Iesire");
return 1;
}
}
}
if(dialogid == 290198)
{
if(!response)//daca apasam pe primul buton, adica Ok
{
if(listitem == 0)//daca dam click pe prima varianta, in cazul nostru Varianta1
{
if(PlayerInfo[playerid][pFlyLic] == 0)
{
if(GetPlayerCash(playerid) < 10000)
{
SendClientMessage(playerid, COLOR_GREY, "Nu ai bani destui for a flying license");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "You bought a flying license for $10,000");
GivePlayerCash(playerid, - 10000);
PlayerInfo[playerid][pFlyLic] = 1;
OnPlayerUpdateEx(playerid);
}
}
else
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, " You already own a flying license");
return 1;
}
}
if(listitem == 1)//daca dam click pe a 2-a varianta, adica Varianta2
{
if(PlayerInfo[playerid][pBoatLic] == 0)
{
if(GetPlayerCash(playerid) < 10000)
{
SendClientMessage(playerid, COLOR_GREY, "Nu ai bani destui for a sailing license");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "You bought a boat license for $10,000");
GivePlayerCash(playerid, - 10000);
PlayerInfo[playerid][pBoatLic] = 1;
OnPlayerUpdateEx(playerid);
}
}
else
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, " You already own a boat license");
return 1;
}
}
if(listitem == 2)//daca dam click pe a 3-a varianta, adica Varianta3
{
if(PlayerInfo[playerid][pGunLic] == 0)
{
if(GetPlayerCash(playerid) < 10000)
{
SendClientMessage(playerid, COLOR_GREY, "Nu ai bani destui for a gun license");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "You bought a gun license for $10,000");
GivePlayerCash(playerid, - 10000);
PlayerInfo[playerid][pGunLic] = 1;
OnPlayerUpdateEx(playerid);
}
}
else
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, " You already own a gun license");
return 1;
}
}
if(listitem == 3)//daca dam click pe a 4-a varianta, adica Varianta4
{
if(PlayerInfo[playerid][pFishLic] == 0)
{
if(GetPlayerCash(playerid) < 10000)
{
SendClientMessage(playerid, COLOR_GREY, "Nu ai bani destui for a fishing license");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "You bought a fishing license for $10,000");
GivePlayerCash(playerid, - 10000);
PlayerInfo[playerid][pFishLic] = 1;
OnPlayerUpdateEx(playerid);
}
}
else
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, " You already own a fishing license");
return 1;
}
}
}
}
Imagini / Video (optional):- Ati incercat sa rezolvati singur?: da
Question
Issey
Problema intalnita (descriere):Salut, am problema cu un dialog, cand scriu comanda : "/buylicenses" apare dialogul,dar cand dau de exemplu pe Flying , nu se intampla nimic , nu imi da nici licenta , nu imi ia nici banii , nu apare nici mesajul.. si nu inteleg..cred ca am uitat ceva ..sper sa ma ajutati voi
Ero(area / rile) / warning-(ul / urile):-
Liniile de cod / sursa / script-ul(obligatoriu):
Edited by IsseyImagini / Video (optional):-
Ati incercat sa rezolvati singur?: da
Link to comment
Share on other sites
4 answers to this question
Recommended Posts