OnPlayerText please help
#1

How to make a text that makes 2 things in the same range of point, depends on what textdraw is showing now

Example:

pawn Код:
public OnPlayerEnterDynamicCP(checkpointid)
{
    if(checkpointid == LV[/LIST]CityHall) //LVCityHall Textdraws---------------
    {
        it will show him a textdraw with options....
        1. skills
        2. lottory
    }
}

public OnPlayerText(playerid, text[])
{
    if(IsPlayerInRangeOfPoint(playerid,1.0,x,y,z)) //the range of point is the same of the CP (LVCityHall)
    {
        if(strval(text) == 1)
        {
            TextDrawHideForPlayer(playerid, Skills); //if he types number [1] ,,it will hide the main textdraws
            TextDrawShowForPlayer(playerid, SkillsOptions); // and will show another text draws for the SKILLS
            //1. Hitman
            //2. Con Artist
            //3. Rapist
            {
                if(strval(text) == 1)
                {
                    SetPlayerSkill(playerid, Hitman);
                }
            }
        }
    }
    return 1;
}
if the player types number 1, it will hide the main textdraws and show him another textdraw options, the problem is when he types number 1 again to choose the Hitman Skill, it will not choose the hitman skill but it will choose Skills again that its in the main textdraws.

So the number is working only for the main textdraws, somebody know how ??
i think i should add "return" or somthing, but please tell me the solution
Reply
#2

help please
Reply
#3

pawn Код:
public OnPlayerText(playerid, text[])
{
    if(IsPlayerInRangeOfPoint(playerid,1.0,x,y,z)) //the range of point is the same of the CP (LVCityHall)
    {
        if(strlen(text) == 1)
        {
            TextDrawHideForPlayer(playerid, Skills); //if he types number [1] ,,it will hide the main textdraws
            TextDrawShowForPlayer(playerid, SkillsOptions); // and will show another text draws for the SKILLS
            //1. Hitman
            //2. Con Artist
            //3. Rapist
        }
    }
    return 1;
}
Reply
#4

Quote:
Originally Posted by xganyx
Посмотреть сообщение
pawn Код:
public OnPlayerText(playerid, text[])
{
    if(IsPlayerInRangeOfPoint(playerid,1.0,x,y,z)) //the range of point is the same of the CP (LVCityHall)
    {
        if(strlen(text) == 1)
        {
            TextDrawHideForPlayer(playerid, Skills); //if he types number [1] ,,it will hide the main textdraws
            TextDrawShowForPlayer(playerid, SkillsOptions); // and will show another text draws for the SKILLS
            //1. Hitman
            //2. Con Artist
            //3. Rapist
        }
    }
    return 1;
}
i said help, not copy my code -____-
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)