[AYUDA] - Textdraw
#1

Hola, bueno quisiera saber si alguiйn me podrнa ayudar para hacer que en el momento en el que un usuario coloque un comando errуneo salga un textdraw que cree.
Ayudenme por favor se los agradecerнa demasiado
Reply
#2

Podrнas agregar la funciуn GameTextForPlayer. Si tu procesador de comandos es el que viene por defecto (OnPlayerCommandText) retorna la CallBack con la funciуn, en lugar de retornar con el nъmero.
Reply
#3

Utilizo Zcmd, y tampoco entendн muy bien lo quй me dices aъn soy nuevo no sй mucho
Reply
#4

Deberias usar zcmd
PHP код:
public OnPlayerCommandPerformed(playeridcmdtext[], success

    if (!
success
    { 
       
//Tu codigo aca
    

    return 
0

Reply
#5

Aсadiendo a el cуdigo de Whillyrez:

"OnPlayerCommandPerformed" es la llamada del procesador de comandos ZCMD.

PHP код:
public OnPlayerCommandPerformed(playeridcmdtext[], success

    if (!
success
    { 
       
//Tu codigo aca
    

    return 
0

Obviamente donde dice "//Tu cуdigo acб", aсades las lнneas correspondientes de tu TextDraw.
Aunque yo prefiero algo mбs rбpido y cуmodo, lo cual puede ser asн:

PHP код:
public OnPlayerCommandPerformed(playeridcmdtext[], success

    if (!
success
    { 
       
GameTextForPlayer(playerid,"~r~El ~y~comando ~g~es ~p~incorrecto",2000,5);
    } 
    return 
0

Donde:
~r~ = color rojo
~y~ = color amarillo
~g~ = color verde
~p~ = color purpura

2000 = Duraciуn del texto en pantalla
5 = Estilo de texto

Puedes ver mбs funciones dentro de la cita que mostrй en el primer mensaje de respuesta.
Reply
#6

Hola, hasta ahora no me a funcionado ninguno
Miren estй es el textdraw que quiero que salga me ayudan por favor

Quote:

Textdraw0 = TextDrawCreate(467.600128, 123.953338, "usebox");
TextDrawLetterSize(Textdraw0, 0.000000, 1.001851);
TextDrawTextSize(Textdraw0, 183.599945, 0.000000);
TextDrawAlignment(Textdraw0, 1);
TextDrawColor(Textdraw0, 0);
TextDrawUseBox(Textdraw0, true);
TextDrawBoxColor(Textdraw0, 102);
TextDrawSetShadow(Textdraw0, 0);
TextDrawSetOutline(Textdraw0, 0);
TextDrawFont(Textdraw0, 0);

Textdraw1 = TextDrawCreate(188.799896, 120.960006, "~y~] ~w~El comando ~r~no existe~w~! ~y~]");
TextDrawLetterSize(Textdraw1, 0.449999, 1.600000);
TextDrawAlignment(Textdraw1, 1);
TextDrawColor(Textdraw1, -1);
TextDrawSetShadow(Textdraw1, 0);
TextDrawSetOutline(Textdraw1, 1);
TextDrawBackgroundColor(Textdraw1, 51);
TextDrawFont(Textdraw1, 2);
TextDrawSetProportional(Textdraw1, 1);

Reply
#7

Puedes intentar lo que te dijo xGrov3x o puedes poner que el Textdraw te aparezca al momento de utilizar un comando erroneo y colocar un timer
Reply
#8

Algo asн

PHP код:


public OnPlayerCommandPerformed(playeridcmdtext[], success)  
{  
    if (!
success)  
    {  
       
TextDrawShowForPlayer(playeridTextdraw0);
       
TextDrawShowForPlayer(playeridTextdraw1);
    }  
    return 
0;  

Ya para ocultarlos usa la funciуn

TextDrawHideForPlayer

https://sampwiki.blast.hk/wiki/TextDrawHideForPlayer
Reply
#9

Te meterбs en un gran lнo usando una TextDraw, digamos que en el tema del "lag". No te lo recomiendo, pero cada quien sus gustos.

Y aсadiendo a lo que menciona Eloy, tendrнas que usar un pequeсo -timer- para que desaparezca.

Insisto, usa mejor la funciуn que yo te mencionaba.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)