[Request]Example :)
#1

Hello Every One i Want Example How To Make Choose With Numbers i Done Making this Textdraw i Want Make it with Simple Commands

PHP код:
// TextDraw developed using Zamaroht's Textdraw Editor 1.0
// On top of script:
new Text:Textdraw0;
new 
Text:Textdraw1;
new 
Text:Textdraw2;
new 
Text:Textdraw3;
new 
Text:Textdraw4;
new 
Text:Textdraw5;
new 
Text:Textdraw6;
new 
Text:Textdraw7;
new 
Text:Textdraw8;
new 
Text:Textdraw9;
new 
Text:Textdraw10;
new 
Text:Textdraw11;
new 
Text:Textdraw12;
// In OnGameModeInit prefferably, we procced to create our textdraws:
Textdraw0 TextDrawCreate(257.000000114.000000"_");
TextDrawBackgroundColor(Textdraw0255);
TextDrawFont(Textdraw01);
TextDrawLetterSize(Textdraw00.46000017.900032);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw00);
TextDrawSetProportional(Textdraw01);
TextDrawSetShadow(Textdraw01);
TextDrawUseBox(Textdraw01);
TextDrawBoxColor(Textdraw0170);
TextDrawTextSize(Textdraw00.0000004.000000);
Textdraw1 TextDrawCreate(257.000000114.000000"_");
TextDrawBackgroundColor(Textdraw1255);
TextDrawFont(Textdraw11);
TextDrawLetterSize(Textdraw11000.0000002.999999);
TextDrawColor(Textdraw165535);
TextDrawSetOutline(Textdraw10);
TextDrawSetProportional(Textdraw11);
TextDrawSetShadow(Textdraw11);
TextDrawUseBox(Textdraw11);
TextDrawBoxColor(Textdraw1176895);
TextDrawTextSize(Textdraw10.0000004.000000);
Textdraw2 TextDrawCreate(15.000000115.000000"FRSIT WRITE");
TextDrawBackgroundColor(Textdraw2255);
TextDrawFont(Textdraw21);
TextDrawLetterSize(Textdraw20.5000001.000000);
TextDrawColor(Textdraw2, -1);
TextDrawSetOutline(Textdraw20);
TextDrawSetProportional(Textdraw21);
TextDrawSetShadow(Textdraw21);
Textdraw3 TextDrawCreate(49.000000126.000000"- 2WRITE");
TextDrawBackgroundColor(Textdraw3255);
TextDrawFont(Textdraw31);
TextDrawLetterSize(Textdraw30.5000001.000000);
TextDrawColor(Textdraw3, -1);
TextDrawSetOutline(Textdraw30);
TextDrawSetProportional(Textdraw31);
TextDrawSetShadow(Textdraw31);
Textdraw4 TextDrawCreate(58.000000244.000000"Press F6 (T) And Select A Number");
TextDrawBackgroundColor(Textdraw4255);
TextDrawFont(Textdraw41);
TextDrawLetterSize(Textdraw40.2199991.000000);
TextDrawColor(Textdraw4, -1);
TextDrawSetOutline(Textdraw40);
TextDrawSetProportional(Textdraw41);
TextDrawSetShadow(Textdraw41);
Textdraw5 TextDrawCreate(65.000000256.000000"Press LMB To Close This Box");
TextDrawBackgroundColor(Textdraw5255);
TextDrawFont(Textdraw51);
TextDrawLetterSize(Textdraw50.2199991.000000);
TextDrawColor(Textdraw5, -1);
TextDrawSetOutline(Textdraw50);
TextDrawSetProportional(Textdraw51);
TextDrawSetShadow(Textdraw51);
Textdraw6 TextDrawCreate(94.000000150.000000"NAME 7aga");
TextDrawBackgroundColor(Textdraw6255);
TextDrawFont(Textdraw61);
TextDrawLetterSize(Textdraw60.2199991.000000);
TextDrawColor(Textdraw6, -1);
TextDrawSetOutline(Textdraw60);
TextDrawSetProportional(Textdraw61);
TextDrawSetShadow(Textdraw61);
Textdraw7 TextDrawCreate(9.000000165.000000"1.");
TextDrawBackgroundColor(Textdraw7255);
TextDrawFont(Textdraw71);
TextDrawLetterSize(Textdraw70.3100001.100000);
TextDrawColor(Textdraw7176895);
TextDrawSetOutline(Textdraw71);
TextDrawSetProportional(Textdraw70);
Textdraw8 TextDrawCreate(9.000000175.000000"2.");
TextDrawBackgroundColor(Textdraw8255);
TextDrawFont(Textdraw81);
TextDrawLetterSize(Textdraw80.3100001.100000);
TextDrawColor(Textdraw8176895);
TextDrawSetOutline(Textdraw81);
TextDrawSetProportional(Textdraw80);
Textdraw9 TextDrawCreate(9.000000185.000000"3.");
TextDrawBackgroundColor(Textdraw9255);
TextDrawFont(Textdraw91);
TextDrawLetterSize(Textdraw90.3100001.100000);
TextDrawColor(Textdraw9176895);
TextDrawSetOutline(Textdraw91);
TextDrawSetProportional(Textdraw90);
Textdraw10 TextDrawCreate(9.000000195.000000"4.");
TextDrawBackgroundColor(Textdraw10255);
TextDrawFont(Textdraw101);
TextDrawLetterSize(Textdraw100.3100001.100000);
TextDrawColor(Textdraw10176895);
TextDrawSetOutline(Textdraw101);
TextDrawSetProportional(Textdraw100);
Textdraw11 TextDrawCreate(9.000000205.000000"5.");
TextDrawBackgroundColor(Textdraw11255);
TextDrawFont(Textdraw111);
TextDrawLetterSize(Textdraw110.3100001.100000);
TextDrawColor(Textdraw11176895);
TextDrawSetOutline(Textdraw111);
TextDrawSetProportional(Textdraw110);
Textdraw12 TextDrawCreate(9.000000215.000000"6.");
TextDrawBackgroundColor(Textdraw12255);
TextDrawFont(Textdraw121);
TextDrawLetterSize(Textdraw120.3100001.100000);
TextDrawColor(Textdraw12176895);
TextDrawSetOutline(Textdraw121);
TextDrawSetProportional(Textdraw120);
// You can now use TextDrawShowForPlayer(-ForAll), TextDrawHideForPlayer(-ForAll) and
// TextDrawDestroy functions to show, hide, and destroy the textdraw. 
Reply
#2

Please Help!!
Reply
#3

Bumping is only allowed after 24 hours.

O.T use ******
Reply
#4

What? Do you want when textdraw it's active, and if he write for example "1" withouth " " will show him help about that section?

If yes, you can do it.

First, to work more faster and don't type every time showin' / hidden them it's better to create a stock. So add in your script stocks for Hide/Show textdraws.

pawn Код:
stock Show(playerid)
{
    TextDrawShowForPlayer(playerid, Textdraw0);
    TextDrawShowForPlayer(playerid, Textdraw1);
    TextDrawShowForPlayer(playerid, Textdraw2);
    TextDrawShowForPlayer(playerid, Textdraw3);
    TextDrawShowForPlayer(playerid, Textdraw4);
    TextDrawShowForPlayer(playerid, Textdraw5);
    TextDrawShowForPlayer(playerid, Textdraw6);
    TextDrawShowForPlayer(playerid, Textdraw7);
    TextDrawShowForPlayer(playerid, Textdraw8);
    TextDrawShowForPlayer(playerid, Textdraw9);
    TextDrawShowForPlayer(playerid, Textdraw10);
    TextDrawShowForPlayer(playerid, Textdraw11);
    TextDrawShowForPlayer(playerid, Textdraw12);
}

stock Hide(playerid)
{
    TextDrawHideForPlayer(playerid, Textdraw0);
    TextDrawHideForPlayer(playerid, Textdraw1);
    TextDrawHideForPlayer(playerid, Textdraw2);
    TextDrawHideForPlayer(playerid, Textdraw3);
    TextDrawHideForPlayer(playerid, Textdraw4);
    TextDrawHideForPlayer(playerid, Textdraw5);
    TextDrawHideForPlayer(playerid, Textdraw6);
    TextDrawHideForPlayer(playerid, Textdraw7);
    TextDrawHideForPlayer(playerid, Textdraw8);
    TextDrawHideForPlayer(playerid, Textdraw9);
    TextDrawHideForPlayer(playerid, Textdraw10);
    TextDrawHideForPlayer(playerid, Textdraw11);
    TextDrawHideForPlayer(playerid, Textdraw12);
}
... Good, now we need a commad to show that textdraws. I hope you use ZCMD. .
But first we make a variable, wich will check if textdraws are on his screen. Else when he write for example 1 in chat, then he will show that function you made.

pawn Код:
new ShowText[MAX_PLAYERS];
pawn Код:
CMD:show(playerid, params[])
{
    Show(playerid);
    ShowText[playerid] = 1;
    return 1;
}
- So now, Textdraw it's showin' when type command /Show, you can edit it, with your wish command.

Then we movin' under OnPlayerText and add:

pawn Код:
public OnPlayerText(playerid, text[])
{
    if(text[0] == '1') // if he write 1 in chat
    {
        if(ShowText[playerid] == 1) // If Textdraws are open.
        {
            // Make your function right here
            // For Example
            SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}You typed *1.");
        }
    }
    if(text[1] == '2') // if he write 2 in chat
    {
        if(ShowText[playerid] == 1)
        {
            // MAKE Another function here.
        }
    }
    return 1;
}
And you contiunue, like this, you get it.

! REMEMBER: - This it's Scripting Help, NOT request help / codes. I just helped you because I'm bored.

I hope this code will work for you.

UNTESTED CODE.

! NOTE:- Don't forget to add ShowText[playerid] = 0; under close textdraw code, else when you type " 1 ", " 2 ", etc, will show you functions you made under OnPlayerText(). Something like.

pawn Код:
CMD:close(playerid, params[])
{
    Hide(playerid);
    ShowText[playerid] = 0;
    return 1;
}
Reply
#5

Quote:
Originally Posted by HY
Посмотреть сообщение
What? Do you want when textdraw it's active, and if he write for example "1" withouth " " will show him help about that section?

If yes, you can do it.

First, to work more faster and don't type every time showin' / hidden them it's better to create a stock. So add in your script stocks for Hide/Show textdraws.

pawn Код:
stock Show(playerid)
{
    TextDrawShowForPlayer(playerid, Textdraw0);
    TextDrawShowForPlayer(playerid, Textdraw1);
    TextDrawShowForPlayer(playerid, Textdraw2);
    TextDrawShowForPlayer(playerid, Textdraw3);
    TextDrawShowForPlayer(playerid, Textdraw4);
    TextDrawShowForPlayer(playerid, Textdraw5);
    TextDrawShowForPlayer(playerid, Textdraw6);
    TextDrawShowForPlayer(playerid, Textdraw7);
    TextDrawShowForPlayer(playerid, Textdraw8);
    TextDrawShowForPlayer(playerid, Textdraw9);
    TextDrawShowForPlayer(playerid, Textdraw10);
    TextDrawShowForPlayer(playerid, Textdraw11);
    TextDrawShowForPlayer(playerid, Textdraw12);
}

stock Hide(playerid)
{
    TextDrawHideForPlayer(playerid, Textdraw0);
    TextDrawHideForPlayer(playerid, Textdraw1);
    TextDrawHideForPlayer(playerid, Textdraw2);
    TextDrawHideForPlayer(playerid, Textdraw3);
    TextDrawHideForPlayer(playerid, Textdraw4);
    TextDrawHideForPlayer(playerid, Textdraw5);
    TextDrawHideForPlayer(playerid, Textdraw6);
    TextDrawHideForPlayer(playerid, Textdraw7);
    TextDrawHideForPlayer(playerid, Textdraw8);
    TextDrawHideForPlayer(playerid, Textdraw9);
    TextDrawHideForPlayer(playerid, Textdraw10);
    TextDrawHideForPlayer(playerid, Textdraw11);
    TextDrawHideForPlayer(playerid, Textdraw12);
}
... Good, now we need a commad to show that textdraws. I hope you use ZCMD. .
But first we make a variable, wich will check if textdraws are on his screen. Else when he write for example 1 in chat, then he will show that function you made.

pawn Код:
new ShowText[MAX_PLAYERS];
pawn Код:
CMD:show(playerid, params[])
{
    Show(playerid);
    ShowText[playerid] = 1;
    return 1;
}
- So now, Textdraw it's showin' when type command /Show, you can edit it, with your wish command.

Then we movin' under OnPlayerText and add:

pawn Код:
public OnPlayerText(playerid, text[])
{
    if(text[0] == '1') // if he write 1 in chat
    {
        if(ShowText[playerid] == 1) // If Textdraws are open.
        {
            // Make your function right here
            // For Example
            SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}You typed *1.
        }
    }
    if(text[1] == '2') // if he write 2 in chat
    {
        if(ShowText[playerid] == 1)
        {
            // MAKE Another function here.
        }
    }
    return 1;
}
And you contiunue, like this, you get it.

! REMEMBER: - This it's Scripting Help, NOT request help / codes. I just helped you because I'm bored.

I hope this code will work for you.

UNTESTED CODE.

! NOTE:- Don't forget to add ShowText[playerid] = 0; under close textdraw code, else when you type " 1 ", " 2 ", etc, will show you functions you made under OnPlayerText(). Something like.

pawn Код:
CMD:close(playerid, params[])
{
    Hide(playerid);
    ShowText[playerid] = 0;
    return 1;
}
Thanks For u i Learn now thanksssssss +rep
Reply
#6

after i try to see
the textdraw not showing
i have all textdraw at OnGameModeInit
and no errors
i try only see its will showing or not
its not showing
Reply
#7

1. If you are using an Filterscript then put them under OnFilterScriptInit()
2. If not working, then try to all textdraws under OnPlayerConnect(playerid)
Reply
#8

thanks its working but i have problems i delete the textdraw time jail cuz its OnGameModeinit
and i basic it in onplayerconect
have this error
Quote:

D:\ffff\gamemodes\textdraw.pwn(965) : warning 219: local variable "playerid" shadows a variable at a preceding level

this all textdraw
Quote:

for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
{
JailTimer0[playerid] = TextDrawCreate(469.000000, 376.000000, "Time Until Bail:");
TextDrawBackgroundColor(JailTimer0[playerid], 255);
TextDrawFont(JailTimer0[playerid], 1);
TextDrawLetterSize(JailTimer0[playerid], 0.320000, 1.100000);
TextDrawColor(JailTimer0[playerid], -1);
TextDrawSetOutline(JailTimer0[playerid], 0);
TextDrawSetProportional(JailTimer0[playerid], 1);
TextDrawSetShadow(JailTimer0[playerid], 1);

JailTimer1[playerid] = TextDrawCreate(497.000000, 389.000000, "Bail:");
TextDrawBackgroundColor(JailTimer1[playerid], 255);
TextDrawFont(JailTimer1[playerid], 1);
TextDrawLetterSize(JailTimer1[playerid], 0.320000, 1.100000);
TextDrawColor(JailTimer1[playerid], -1);
TextDrawSetOutline(JailTimer1[playerid], 0);
TextDrawSetProportional(JailTimer1[playerid], 1);
TextDrawSetShadow(JailTimer1[playerid], 1);

JailTimer2[playerid] = TextDrawCreate(523.000000, 390.000000, " ");
TextDrawBackgroundColor(JailTimer2[playerid], 255);
TextDrawFont(JailTimer2[playerid], 1);
TextDrawLetterSize(JailTimer2[playerid], 0.320000, 1.000000);
TextDrawColor(JailTimer2[playerid], 10027263);
TextDrawSetOutline(JailTimer2[playerid], 0);
TextDrawSetProportional(JailTimer2[playerid], 1);
TextDrawSetShadow(JailTimer2[playerid], 1);

JailTimer3[playerid] = TextDrawCreate(554.000000, 376.000000, "00:00");
TextDrawBackgroundColor(JailTimer3[playerid], 255);
TextDrawFont(JailTimer3[playerid], 1);
TextDrawLetterSize(JailTimer3[playerid], 0.320000, 1.000000);
TextDrawColor(JailTimer3[playerid], 10027263);
TextDrawSetOutline(JailTimer3[playerid], 0);
TextDrawSetProportional(JailTimer3[playerid], 1);
TextDrawSetShadow(JailTimer3[playerid], 1);

JailTimer4[playerid] = TextDrawCreate(530.000000, 390.000000, " ");
TextDrawBackgroundColor(JailTimer4[playerid], 255);
TextDrawFont(JailTimer4[playerid], 1);
TextDrawLetterSize(JailTimer4[playerid], 0.320000, 1.000000);
TextDrawColor(JailTimer4[playerid], 10027263);
TextDrawSetOutline(JailTimer4[playerid], 0);
TextDrawSetProportional(JailTimer4[playerid], 1);
TextDrawSetShadow(JailTimer4[playerid], 1);
}

Reply
#9

How To Add Name Somthings Or i use again Textdraw To Name 1.Car
2.Quit
i made it with Textdraw or what ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)