False SendClientMessage won't show. -
NBass - 28.04.2017
Hello,
any ideas why the SendClientMessage is not showing? It should be displayed when the Player is outside the Area.
PHP код:
if(IsPlayerInArea(playerid, -2079.122070, -270.203887, -2055.852294, -258.532623))
{
new Xarea, Yarea, Float:Zarea;
GetPlayerPos(playerid, Xarea, Yarea, Float:Zarea);
if(Xarea >= -2079.122070 && Xarea <= -270.203887 && Yarea >= -2055.852294 && Yarea <= -258.532623)
{
SendClientMessage(playerid,BLUE,"* You're inside this Area."); // This shows normally, it works.
}
else
{
SendClientMessage(playerid,BLUE,"* You're outside this Area"); // This line isn't showing.
return 1;
}
}
Did i miss something, like "return 1;" or something else?
Thanks.
Respuesta: False SendClientMessage won't show. -
Ertouq - 28.04.2017
Try to remove the return 1; within the else and put it out
PHP код:
if(IsPlayerInArea(playerid, -2079.122070, -270.203887, -2055.852294, -258.532623))
{
new Xarea, Yarea, Float:Zarea;
GetPlayerPos(playerid, Xarea, Yarea, Float:Zarea);
if(Xarea >= -2079.122070 && Xarea <= -270.203887 && Yarea >= -2055.852294 && Yarea <= -258.532623)
{
SendClientMessage(playerid,BLUE,"* You're inside this Area."); // This shows normally, it works.
}
else
{
SendClientMessage(playerid,BLUE,"* You're outside this Area"); // This line isn't showing.
return 1; // delete this!
}
return 1; //here
}
Re: False SendClientMessage won't show. -
NBass - 28.04.2017
Thanks, but nothing changed. After that, i can't use any other command. Something is here wrong, but can't really find, what's cause the problem. Code seems to be correct.
Re: False SendClientMessage won't show. -
Hansrutger - 29.04.2017
Code might be correct indeed but then you have to look at calculations. THere is a reason why it never prints out that "You're outside this area" and it's not because SendClientMessage all the sudden bugged out.
I'd bet you money that it's the fact that it never gets inside because of this:
if(IsPlayerInArea(playerid, -2079.122070, -270.203887, -2055.852294, -258.532623))
Why? By the looks of it you are checking same thing twice.
Re: False SendClientMessage won't show. -
NBass - 29.04.2017
Oh! Thank you. And i'm wondering why this isn't working
Tried most codes, changed, but nah. so, Thank you, it works.