OnPlayerText returns 1 whereas it souldn't
#1

pawn Код:
public OnPlayerText(playerid, text[])
{
    if(IsPlayerNPC(playerid)) return 1;
    new playername[MAX_PLAYER_NAME];
    new string[256];


    if(RegStep[playerid] > 0)
    {
        if(RegStep[playerid] == 1)
        {
            if(!strcmp("homme", text, true))
            {
                PlayerInfo[playerid][pSex] = SEX_MALE;
                SendClientMessage(playerid, YELLOW2, "D'accord, donc vous кtes un homme.");
                SendClientMessage(playerid, RED, "Deuxiиme question: Quel est votre date de naissance? (jj/mm/aaaa)");
                RegStep[playerid] = 2;
                RandomSkin(playerid);
            }
            else if(!strcmp("femme", text, true))
            {
                PlayerInfo[playerid][pSex] = SEX_FEMALE;
                SendClientMessage(playerid, YELLOW2, "D'accord, donc vous кtes une femme.");
                SendClientMessage(playerid, RED, "Deuxiиme question: Quel est votre date de naissance? (jj/mm/aaaa)");
                RegStep[playerid] = 2;
                RandomSkin(playerid);
            }
            else
            {
                SendClientMessage(playerid, RED, "Pardon? Tapez \"homme\" ou \"femme\".");
            }
        }

        else if(RegStep[playerid] == 2)
        {
                //some code here
        }
        return 0;
    }
    //some code here
    return 0;
}
Well when you type "homme" or "femme" it displays it on the chatbox (for instance Coicatak: homme) whereas it souldn't...

Any help please?
Reply
#2

Put return 0 under the RandomSkin, both of them
Reply
#3

I tried this also it still does the same...
Reply
#4

Bumb. Any help please??
Reply
#5

Quote:
Originally Posted by Coicatak
Bumb. Any help please??
Reply
#6

Show the whole code. With this there is no way for it to return 1 unless you're an npc
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)