dialoginput style question
#9

Get rid of the ugly strcmp:

pawn Код:
switch(strval(inputtext))
{
    case 1: GivePlayerWeapon(playerid, 8, 1);
    case 2: GivePlayerWeapon(playerid, 9, 1);
    default: SendClientMessage(playerid, COLOR_RED, "Invalid Input");
}
Though it has already been suggested that you should use a list for this kind of stuff. Much easier.
Reply


Messages In This Thread
dialoginput style question - by BlackWolf120 - 01.05.2011, 04:03
Re: dialoginput style question - by Joe Staff - 01.05.2011, 04:30
Re: dialoginput style question - by BlackWolf120 - 01.05.2011, 11:58
Re: dialoginput style question - by BlackWolf120 - 02.05.2011, 17:13
Re: dialoginput style question - by BlackWolf120 - 03.05.2011, 22:23
Re: dialoginput style question - by admantis - 03.05.2011, 23:13
AW: dialoginput style question - by BlackWolf120 - 04.05.2011, 17:00
Re: dialoginput style question - by Jeffry - 05.05.2011, 18:12
Re: dialoginput style question - by Vince - 05.05.2011, 20:32
Re: dialoginput style question - by BlackWolf120 - 06.05.2011, 18:25

Forum Jump:


Users browsing this thread: 1 Guest(s)