07.02.2012, 22:43
I am sure it will work now:
Some returns are needed.
pawn Код:
if(listitem == 49)
{
if(response)
{
if(listitem == 0)
{
if(PlayerData[playerid][GunLicense] == 1) return SCM(playerid,red,"ERROR: You already have gun licenses");
PlayerData[playerid][GunLicense] = 1;
SCM(playerid,COLOR_LIGHTBLUE,"You have bought gun licenses, select Guns under Buy Gun Licenses to get a gun everytime");
ShowPlayerDialog(playerid,47,DIALOG_STYLE_LIST,"City hall","Passport\nGun License","Open","Close");
return 1;
}
if(listitem == 1)
{
if(PlayerData[playerid][GunLicense] == 0) return SCM(playerid,red,"ERROR: You don't have gun licenses");
ShowPlayerDialog(playerid,50,DIALOG_STYLE_LIST,"Guns","Deagle $750\nShotgun $500","Buy","Close");
return 1;
}
}
}
if(listitem == 50)
{
if(response)
{
if(listitem == 0)
{
if(PlayerData[playerid][GunID] == 24) return SCM(playerid,red,"ERROR: You already have a deagle as a gun");
SCM(playerid,COLOR_LIGHTBLUE,"You will now spawn with a free deagle");
PlayerData[playerid][GunID] = 24;
GivePlayerWeapon(playerid,24,100);
ShowPlayerDialog(playerid,47,DIALOG_STYLE_LIST,"City hall","Passport\nGun License","Open","Close");
return 1;
}
if(listitem == 1)
{
if(PlayerData[playerid][GunID] == 25) return SCM(playerid,red,"ERROR: You already have a shotgun as a gun");
SCM(playerid,COLOR_LIGHTBLUE,"You will now spawn with a free shotgun");
PlayerData[playerid][GunID] = 25;
GivePlayerWeapon(playerid,25,100);
ShowPlayerDialog(playerid,47,DIALOG_STYLE_LIST,"City hall","Passport\nGun License","Open","Close");
return 1;
}
}
}