What is this?
#1

Hello, I wanted to ask how I could create this type of message when a player is InRangeOfPoints or when it gets into the car, this type of message under the player chat.
Sorry for my English i'm italian

Reply
#2

It's textdraw.

https://sampwiki.blast.hk/wiki/TextDraws

Textdraw Editors:

https://sampforum.blast.hk/showthread.php?tid=376758

https://sampforum.blast.hk/showthread.php?tid=117851
Reply
#3

I created the TextDraw, but now how I can put that show when OnPlayer is to point?
and after 10 second it destroy...
each time a player is located at that point the TextDraw appears and then disappears.
Reply
#4

You could use a timer than when player is in range it shows the textdraw and starts the timer, when the timer is up it destroys the text draw?

https://sampwiki.blast.hk/wiki/TextDraws

AND

https://sampwiki.blast.hk/wiki/SetTimer
Reply
#5

Use a timer and check if the player is in range of that point. If the player is in range, then use TextDrawShowForPlayer to show the textdraw to the player and set a timer:
pawn Код:
SetTimerEx( "HideATMTD", 10000, false, "i", playerid );
Then, when HideATMTD will be called, hide the textdraw with TextDrawHideForPlayer:
pawn Код:
forward HideATMTD( playerid );
public HideATMTD( playerid )
{
    TextDrawHideForPlayer( ... ); // EDIT THE PARAMETERS.
}
Reply
#6

#include <a_samp>

new Text:Textdraw0;

public OnFilterScriptInit()
{

// Create the textdraws:
Textdraw0 = TextDrawCreate(36.000000, 150.000000, "Premi Return");
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 1);
TextDrawLetterSize(Textdraw0, 0.500000, 1.000000);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 1);
TextDrawSetProportional(Textdraw0, 1);

return 1;
}

public OnFilterScriptExit()
{
TextDrawHideForAll(Textdraw0);
TextDrawDestroy(Textdraw0);
return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 532.3957,-1291.0244,17.2422))
{
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawShowForPlayer(playerid, Textdraw1);
SetTimerEx("TimeUp", 10000, false, "i", playerid);
return 1;
}
return 0;
}
forward TimeUp(playerid);
public TimeUp(playerid)
{
TextDrawHideForPlayer(playerid, Textdraw0);
return 1;
}

[PS]: I remove the other TextDraw for Privacy, this my new script and i want to use it in my future server
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)