Quote:
Originally Posted by [XST]O_x
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?
|
They
are using text-draws and you have basically shown how to detect if a particular text-draw is opened or not.