A question [simple to answer]
#7

As I know CrazyBob's server, they're using textdraws, and then detecting if a player is seeing a certain textdraw, and writing one of the numbers that on it.

Example
pawn Code:
new Text: test;
new bool:IsSeeing[MAX_PLAYERS];

public OnGameModeInit()
{
    test = TextDrawCreate(x,y,"~y~1 ~w~This is item 1~n~~y~2 ~w~ this is item 2 ~n~~y~3 ~w~this is item 3");
    More textdraw info here
    return 1;
}

public OnPlayerEnter24/7store(playerid,24/7storeid) // Randomized as possible
{
    TextDrawShowForPlayer(playerid,test);
    IsSeeing[playerid] == true;
    return 1;
}

public OnPlayerText(playerid, text[])
{
    if(text[0] == '1' && IsSeeing[playerid] == true)
    {
        SendClientMessage(playerid,0x00,"You've chose item 1!");
        IsSeeing[playerid] = false;
        TextDrawHideForPlayer(playerid,test);
        return 0; //So everyone won't see he wrote '1'.
    }
    if(text[0] == '2' && IsSeeing[playerid] == true)
    {
        SendClientMessage(playerid,0x00,"You've chose item 2!");
        IsSeeing[playerid] = false;
        TextDrawHideForPlayer(playerid,test);
        return 0;
    }
    return 1;
}

//ETC.
Got that?
Reply


Messages In This Thread
A question [simple to answer] - by Shockey - 29.09.2010, 11:21
Re: A question [simple to answer] - by Cameltoe - 29.09.2010, 11:25
Re: A question [simple to answer] - by Shockey - 29.09.2010, 11:27
Re: A question [simple to answer] - by Cameltoe - 29.09.2010, 11:30
Re: A question [simple to answer] - by Shockey - 29.09.2010, 11:31
Re: A question [simple to answer] - by rbN. - 29.09.2010, 12:47
Re: A question [simple to answer] - by [XST]O_x - 29.09.2010, 12:56
Re: A question [simple to answer] - by Scenario - 29.09.2010, 13:16
Re: A question [simple to answer] - by [XST]O_x - 29.09.2010, 13:22
Re: A question [simple to answer] - by Scenario - 29.09.2010, 13:24

Forum Jump:


Users browsing this thread: 1 Guest(s)