Why this TextDraw doesen't show?
#1

Here's the code.
pawn Код:
forward EntrateUscite(playerid);
public EntrateUscite(playerid)
{
if(PlayerInfo[playerid][pMember] == 1 && PlayerInfo[playerid][pMember] == 2 && PlayerInfo[playerid][pLeader] == 1 && PlayerInfo[playerid][pLeader] == 2)
{
if(IsPlayerInRangeOfPoint(5.0,playerid,-1979.2408,430.9018,25.4377))
{
TextDrawSetString(Textdrawtutorial, "Premi ~y~Y~w~ per entrare");
TextDrawShowForPlayer(playerid, Textdrawtutorial);
}
else if(IsPlayerInRangeOfPoint(5.0,playerid,-2021.4196,406.0409,2.8828))
{
TextDrawSetString(Textdrawtutorial, "Premi ~y~Y~w~ per uscire");
TextDrawShowForPlayer(playerid, Textdrawtutorial);
}
}
return 1;
}
public OnPlayerConnect(playerid) //This is only a part of OnPlayerConnect.
{
SetTimerEx("EntrateUscite", 500, true, "i", playerid);
Thanks.
Reply
#2

Try using GameTextForPlayer instead.

https://sampwiki.blast.hk/wiki/GameTextForPlayer
Reply
#3

Quote:
Originally Posted by eXeDev
Посмотреть сообщение
Try using GameTextForPlayer instead.

https://sampwiki.blast.hk/wiki/GameTextForPlayer
That's really ugly...

Other methods?!
Reply
#4

because of this!
:
pawn Код:
if(PlayerInfo[playerid][pMember] == 1 && PlayerInfo[playerid][pMember] == 2 && PlayerInfo[playerid][pLeader] == 1 && PlayerInfo[playerid][pLeader] == 2)
edit it to:
pawn Код:
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 2)
Reply
#5

Quote:
Originally Posted by Eth
Посмотреть сообщение
because of this!
:
pawn Код:
if(PlayerInfo[playerid][pMember] == 1 && PlayerInfo[playerid][pMember] == 2 && PlayerInfo[playerid][pLeader] == 1 && PlayerInfo[playerid][pLeader] == 2)
edit it to:
pawn Код:
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 2)
Thanks.
The other problem was if(IsPlayerInRangeOfPoint(5.0,playerid,-1979.2408,430.9018,25.4377))
{
I changed IsPlayerInRangeOfPoint to PlayerToPointStripped and it worked.

REP+ to you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)