GetPlayerInterior prob
#1

I still can go to player if he in interior

pawn Код:
if(GetPlayerInterior(pID) > 0)
{
    SendClientMessage(playerid, COLOR_RED, "This Player Is In A Interior And You Cannot Go To Him.");
    return 1;
}
Reply
#2

Try if(GetPlayerInterior(pID) != 0)
Reply
#3

pawn Код:
if(GetPlayerInterior(pID) >= 0)
{
    return SendClientMessage(playerid, COLOR_RED, "This Player Is In A Interior And You Cannot Go To Him.");
}
zero and below zero gives this warning.
Reply
#4

Oh, well good thing there's no such thing as interior '-1'...

pawn Код:
if(GetPlayerInterior(pID) != 0) return SendClientMessage(playerid, COLOR_RED, "This Player Is In An Interior And You Cannot Go To Them.");
If that doesn't work, then 'pID' is not the correct playerid and you are probably assigning a wrong value to it in your script.
Reply
#5

Код:
new interior;
interior=GetPlayerInterior(pID);
if(pID!=0)
{
   your message
   return 1;
}
;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)