Can I define a string like this?
#2

Try with this:

Код:
stock SexGender(playerid)
{
    new Sex2[3]; //IceCube! suggestion "Another off topic tip... You have new sex2[128]; it wastes memory not getting too advanced or there are better ways again but his and her is 3 always so only use the memory needed..."

    if(IsPlayerConnected(playerid))
    {
        //i think you should use this: (1 = girl, 2 = boy)
        if(Player[playerid][Gender] == 1)
        {
            Sex2 = "her";
        }
        else
        {
            Sex2 = "his";
        }
    }

    return Sex2;
}
Reply


Messages In This Thread
Can I define a string like this? - by Stefand - 09.05.2013, 20:27
Respuesta: Can I define a string like this? - by LoLeRo - 09.05.2013, 20:33
Re: Can I define a string like this? - by Scenario - 09.05.2013, 20:33
AW: Can I define a string like this? - by BigETI - 09.05.2013, 20:38
Re: Can I define a string like this? - by IceCube! - 09.05.2013, 20:44
Re: Can I define a string like this? - by Vince - 09.05.2013, 20:54
Re: Can I define a string like this? - by Stefand - 09.05.2013, 21:25
Respuesta: Can I define a string like this? - by LoLeRo - 09.05.2013, 21:28
Re: Can I define a string like this? - by Scenario - 09.05.2013, 21:29
Re: Can I define a string like this? - by Stefand - 09.05.2013, 21:52

Forum Jump:


Users browsing this thread: 2 Guest(s)