SA-MP Forums Archive
GetPlayerInterior prob - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: GetPlayerInterior prob (/showthread.php?tid=513611)



GetPlayerInterior prob - Ananisiki - 17.05.2014

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;
}



Re: GetPlayerInterior prob - Stinged - 17.05.2014

Try if(GetPlayerInterior(pID) != 0)


Re: GetPlayerInterior prob - Hwang - 17.05.2014

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.


Re: GetPlayerInterior prob - Threshold - 17.05.2014

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.


Re: GetPlayerInterior prob - Rittik - 17.05.2014

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