How would I create Multiple if/else statements -
Deal-or-die - 18.08.2012
How would I create Multiple if/else statements within on case?
For example purposes only.
pawn Код:
.
case 168://Finalise
{
if(!response) return ShowPlayerDialog(playerid, 160, DIALOG_STYLE_LIST, "House Creation Menu", "Set Exterior Position\r\nSet Interior Position\r\nSet Lock\r\nSet Alarm\r\nSet Address\r\nSet Number of Rooms\r\nSet number of Vehicle slots\r\nFinalise","Continue","Close");
if(response)
{
if(Create[playerid][hExtSet] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "Please confirm the {FF8000}Exterior{808080} position of this house.");
}
else if(Create[playerid][hIntSet] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "Please confirm the {FF8000}Interior{808080} position of this house.");
}
Re: How would I create Multiple if/else statements -
Deal-or-die - 19.08.2012
Seriously..? No-one has came up with a solution... -.^
Re: How would I create Multiple if/else statements -
Supercop - 19.08.2012
What do you mean exactly? An if/else statement right in one of the if/else statements?
pawn Код:
else if(Create[playerid][hIntSet] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "Please confirm the {FF8000}Interior{808080} position of this house.");
if(RandomVar != 0)
{
Ban(playerid);
}
}
??
Re: How would I create Multiple if/else statements -
Arca - 19.08.2012
Quote:
Originally Posted by Deal-or-die
How would I create Multiple if/else statements within on case?
|
You just did.
Re: How would I create Multiple if/else statements -
Deal-or-die - 19.08.2012
So what I have should work...? -.^
Well now I feel like a twat.... -.-
Sorry, I'll shut up and cheers for your help.
Re: How would I create Multiple if/else statements -
Rudy_ - 19.08.2012
Don't get you.
You want it explained? or what?
Re: How would I create Multiple if/else statements -
Deal-or-die - 19.08.2012
Nah, I was told once before by someone I thought was a genius scripter that what I have stated as an example above, would not work, so Without me trialing it I came crying for help here. Cheers for your responses I think this is sorted, and I have learnt not to embarrass myself next time by not trying something before bitching.
Re: How would I create Multiple if/else statements -
iToast - 19.08.2012
Depeneding on what you're doing, you will want to use switch.