DIALOG Problem -
Branzy - 02.04.2013
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_CLASS)
{
if(response)
{
switch(listitem)
{
case 0: Soldier
{
GivePlayerWeapon(playerid,24,300);
GivePlayerWeapon(playerid,27,300);
GivePlayerWeapon(playerid,31,300);
}
case 1: Sniper
{
GivePlayerWeapon(playerid,25,300);
GivePlayerWeapon(playerid,34,100);
GivePlayerWeapon(playerid,39,10);
}
case 2: Engineer
{
GivePlayerWeapon(playerid,29,300);
GivePlayerWeapon(playerid,36,5);
GivePlayerWeapon(playerid,16,5);
}
case 3: Scout
{
GivePlayerWeapon(playerid,22,300);
GivePlayerWeapon(playerid,32,300);
GivePlayerWeapon(playerid,16,5);
}
case 4: Pilot
{
GivePlayerWeapon(playerid,30,300);
GivePlayerWeapon(playerid,24,300);
GivePlayerWeapon(playerid,33,300);
}
case 5: Suicider
{
GivePlayerWeapon(playerid,16,8);
GivePlayerWeapon(playerid,30,300);
GivePlayerWeapon(playerid,37,200);
}
case 6: Rebel
{
GivePlayerWeapon(playerid,24,300);
GivePlayerWeapon(playerid,34,300);
GivePlayerWeapon(playerid,4,1);
}
case 7: Assassin
{
GivePlayerWeapon(playerid,18,5);
GivePlayerWeapon(playerid,27,300);
GivePlayerWeapon(playerid,22,300);
}
case 8: Burglar
{
GivePlayerWeapon(playerid,8,1);
GivePlayerWeapon(playerid,23,300);
GivePlayerWeapon(playerid,25,300);
}
case 9: Trooper
{
GivePlayerWeapon(playerid,18,5);
GivePlayerWeapon(playerid,22,300);
GivePlayerWeapon(playerid,9,1);
}
case 10: Marine
{
GivePlayerWeapon(playerid,42,80);
GivePlayerWeapon(playerid,34,300);
GivePlayerWeapon(playerid,31,300);
}
}
}
}
return 0;
}
I have this and I want to add
For;
Код:
case 5: Suicider
{
GivePlayerWeapon(playerid,16,8);
GivePlayerWeapon(playerid,30,300);
GivePlayerWeapon(playerid,37,200);
}
case 6: Rebel
{
GivePlayerWeapon(playerid,24,300);
GivePlayerWeapon(playerid,34,300);
GivePlayerWeapon(playerid,4,1);
}
case 7: Assassin
{
GivePlayerWeapon(playerid,18,5);
GivePlayerWeapon(playerid,27,300);
GivePlayerWeapon(playerid,22,300);
}
And
for
Код:
case 8: Burglar
{
GivePlayerWeapon(playerid,8,1);
GivePlayerWeapon(playerid,23,300);
GivePlayerWeapon(playerid,25,300);
}
case 9: Trooper
{
GivePlayerWeapon(playerid,18,5);
GivePlayerWeapon(playerid,22,300);
GivePlayerWeapon(playerid,9,1);
}
case 10: Marine
{
GivePlayerWeapon(playerid,42,80);
GivePlayerWeapon(playerid,34,300);
GivePlayerWeapon(playerid,31,300);
}
Re: DIALOG Problem -
teomakedonija - 02.04.2013
What's now it's your problem ?
Re: DIALOG Problem -
EiresJason - 02.04.2013
Comment out the "Marine/Trooper, etc."
Do that for all them, so add // before them.
Im pretty sure you
can't have:
So basically:
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_CLASS)
{
if(response)
{
switch(listitem)
{
case 0:// Soldier
{
GivePlayerWeapon(playerid,24,300);
GivePlayerWeapon(playerid,27,300);
GivePlayerWeapon(playerid,31,300);
}
case 1: //Sniper
{
GivePlayerWeapon(playerid,25,300);
GivePlayerWeapon(playerid,34,100);
GivePlayerWeapon(playerid,39,10);
}
case 2:// Engineer
{
GivePlayerWeapon(playerid,29,300);
GivePlayerWeapon(playerid,36,5);
GivePlayerWeapon(playerid,16,5);
}
case 3: //Scout
{
GivePlayerWeapon(playerid,22,300);
GivePlayerWeapon(playerid,32,300);
GivePlayerWeapon(playerid,16,5);
}
case 4:// Pilot
{
GivePlayerWeapon(playerid,30,300);
GivePlayerWeapon(playerid,24,300);
GivePlayerWeapon(playerid,33,300);
}
case 5: //Suicider
{
GivePlayerWeapon(playerid,16,8);
GivePlayerWeapon(playerid,30,300);
GivePlayerWeapon(playerid,37,200);
}
case 6: //Rebel
{
GivePlayerWeapon(playerid,24,300);
GivePlayerWeapon(playerid,34,300);
GivePlayerWeapon(playerid,4,1);
}
case 7: //Assassin
{
GivePlayerWeapon(playerid,18,5);
GivePlayerWeapon(playerid,27,300);
GivePlayerWeapon(playerid,22,300);
}
case 8: //Burglar
{
GivePlayerWeapon(playerid,8,1);
GivePlayerWeapon(playerid,23,300);
GivePlayerWeapon(playerid,25,300);
}
case 9: //Trooper
{
GivePlayerWeapon(playerid,18,5);
GivePlayerWeapon(playerid,22,300);
GivePlayerWeapon(playerid,9,1);
}
case 10: //Marine
{
GivePlayerWeapon(playerid,42,80);
GivePlayerWeapon(playerid,34,300);
GivePlayerWeapon(playerid,31,300);
}
}
}
}
return 0;
}
Re: DIALOG Problem -
Branzy - 02.04.2013
No the thing is that case= 0-5 are for a team
and others are for different teams .
But i can't make case 6-10 for other teams
Re: DIALOG Problem -
EiresJason - 02.04.2013
Show me your ShowPlayerDialog line