ThexDrawShowForPlayer - IsPlayerInRangeOfPoint
#1

Hello all, i make a sript, when player is on this coord
PHP код:
2,1790.2367,-1867.5315,13.5701 
to show the textdraw, and if is not, to HideTheTextDraw
PHP код:
forward InformatieServer1(playerid);
public 
InformatieServer1(playerid)
{
    if(
IsPlayerInRangeOfPoint(playerid,2,1790.2367,-1867.5315,13.5701))
    
TextDrawShowForPlayer(playerid,InformatieServer[0]);
    else 
TextDrawHideForPlayer(playerid,InformatieServer[0]);
    
    return 
1;

NOTE: The textDraw is create in OnGameModeInit.

BUT! NOT SHOW THE TEXTDRAW
Reply
#2

Quote:
Originally Posted by Sn4ke2
Посмотреть сообщение
Hello all, i make a sript, when player is on this coord
PHP код:
2,1790.2367,-1867.5315,13.5701 
to show the textdraw, and if is not, to HideTheTextDraw
PHP код:
forward InformatieServer1(playerid);
public 
InformatieServer1(playerid)
{
    if(
IsPlayerInRangeOfPoint(playerid,2,1790.2367,-1867.5315,13.5701))
    
TextDrawShowForPlayer(playerid,InformatieServer[0]);
    else 
TextDrawHideForPlayer(playerid,InformatieServer[0]);
    
    return 
1;

NOTE: The textDraw is create in OnGameModeInit.


BUT! NOT SHOW THE TEXTDRAW
you need create timer, SetTimer("InformatieServer1", 800, true);
and boolhowTextDraw;

and you use

for(new i; i < MAX_PLAYERS; i++)
{
if(IsPlayerInRangeOfPoint(i, 3, ))
{
if(showTextDraw == false)
{
TextDrawShowForPlayer(i,InformatieServer[0]);
showTextDraw = true;
}
return;
}
}
if(showTextDraw == true)
{
TextDrawHideForPlayer(i,InformatieServer[0]);
showTextDraw = false;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)