SA-MP Forums Archive
How To Do This? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How To Do This? (/showthread.php?tid=303086)



How To Do This? - BetaLaxx - 11.12.2011

Well, Actually added a input box which asks a player to type in what he is, "male" or "female"
But stuck over here, please help.

pawn Код:
if(strval(inputtext) >= )
                            {
                            return 1;
                            }



Re: How To Do This? - Dark_Kostas - 11.12.2011

You can make him type "m" for male of "f" for female and use the following code.
pawn Код:
switch(inputtext)
{
       case 'm': //he is male
       case 'f': //he is female
       default: //Send him again the dialog to type the correct answer
}



Re: How To Do This? - BetaLaxx - 11.12.2011

pawn Код:
C:\Alex\County Wars TDM 0.3d\gamemodes\CRP.pwn(501) : error 033: array must be indexed (variable "-unknown-")
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
pawn Код:
if(dialogid == DIALOG_GENDER)
                {
                    if(response)
                        {
                switch(inputtext)
        {
                                case 'm': PlayerInfo[playerid][pGender] = 1;
                                case 'f': PlayerInfo[playerid][pGender] = 2;
        }
                        }
                        else
                        {
                        Kick(playerid);
                        }
                        }



Re: How To Do This? - kurta999 - 11.12.2011

pawn Код:
switch(inputtext[0])
{
       case 'm': //he is male
       case 'f': //he is female
       default: //Send him again the dialog to type the correct answer
}