11.03.2013, 08:31
(
Last edited by RajatPawar; 13/03/2013 at 09:14 AM.
)
Hello guys.
This is an include of mine.
Use it to whatever needs you have.
NOTE: Please use ~n~ before the 33rd character of any sentence, if not, it will go outta the box.
Am working on adding a #if statement to make it easier for you guys.
Stock functions:
Example scripts:
SS:
Examples/How to:
Each menu created is assigned an ID, you must use it to show it to a player. For example:
Then:
To say, cancel it on player click:
To reset all IDS, just use ResetTDs. (Of no use, to be honest, since this doesn't save IDs)
To check if he's viewing any TD Box - IsPlayerViewingAnyTDBox(playerid) !
Thanks. That's it.
I used y_hooks for this.
To use it, just do:
Credits:
****** - y_hooks
Sinner - for his awesome bug solving skills
iPleoMax - for his ultra superb TD editor
ZCMD - for his zcmd
You all !
Download:
Clicky here
FAQ:
1) I can't go to the next line? Even though I used ~n~?
Ans: You must use ~n~ connecting two letters, for example:
CORRECT:
WRONG:
Extra:
Some stocks you can make on your own
This is an include of mine.
Use it to whatever needs you have.
NOTE: Please use ~n~ before the 33rd character of any sentence, if not, it will go outta the box.
Am working on adding a #if statement to make it easier for you guys.
Stock functions:
pawn Code:
native CreateTDboxForPlayer(playerid, title[], titlecolor, string[]);
native ShowTDboxToPlayer(playerid, boxid);
native HideTDboxForPlayer(playerid, boxid);
native ResetTDboxes();
native IsPlayerViewingTDBox(playerid, boxid);
native IsPlayerViewingAnyTDBox(playerid);
pawn Code:
CMD:help(playerid)
{
new Te = CreateTDboxForPlayer(playerid, "Help me!", -1, "~w~1. ~y~Buy potatoes~n~~w~2.~y~ Buy some ~r~crazy ~g~shit~n~~w~3.~y~ Some random option~n~4. Exit");
ShowTDboxToPlayer(playerid, Te);
return 1;
}
Examples/How to:
Each menu created is assigned an ID, you must use it to show it to a player. For example:
pawn Code:
new h_box =CreateTDBoxForPlayer(playerid, "Help! " , MY_COLOR_DEFINE, "My help~n~Bla Bla");
pawn Code:
ShowTDBoxToPlayer(playerid, h_box);
pawn Code:
public OnPlayerKeyStateChange(..)
{
if(newkeys & KEY_FIRE)
{
if(IsPlayerViewingTDBox(playerid, h_box))
{
HideTDboxForPlayer(playerid, h_box);
}
}
}
To check if he's viewing any TD Box - IsPlayerViewingAnyTDBox(playerid) !
Thanks. That's it.
I used y_hooks for this.
To use it, just do:
pawn Code:
#include <rInfoBox>
****** - y_hooks
Sinner - for his awesome bug solving skills
iPleoMax - for his ultra superb TD editor
ZCMD - for his zcmd
You all !
Download:
Clicky here
FAQ:
1) I can't go to the next line? Even though I used ~n~?
Ans: You must use ~n~ connecting two letters, for example:
CORRECT:
pawn Code:
something~n~something
pawn Code:
something ~n~ something
Some stocks you can make on your own
pawn Code:
stock ShowTDBoxToAll(playerid, boxid)
{
for( new i; i < MAX_PLAYERS; i++)
{
ShowTDBoxToPlayer(i, boxid)
}
return 1;
}