Help with /find command -
qUick1337 - 28.08.2011
I maked some changes on /find command and i add this :
Код:
for(new h = 0; h < sizeof(HouseInfo); h++)
{
if(PlayerInfo[playerid][pIsAtHouse] == 0)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(giveplayerid, X,Y,Z);
SetPlayerCheckpoint(playerid, X,Y,Z, 6);
}
else if(PlayerInfo[playerid][pIsAtHouse] >= 1)
{
SetPlayerCheckpoint(giveplayerid, HouseInfo[h][hEntrancex],HouseInfo[h][hEntrancex],HouseInfo[h][hEntrancex], 6);
}
}
if player is in house the checkpoint appear at the entranceX,Y,Z and if player is not in house the player appear normaly. But i have a problem

the normal way works but when im in house the checkpoint appear wrong. I need this fast....
Re: Help with /find command -
qUick1337 - 29.08.2011
up...
Re: Help with /find command -
AndreT - 29.08.2011
I assume the house ID the player is in is stored in PlayerInfo[playerid][pIsAtHouse]?
Then you don't need a loop!
pawn Код:
if(!PlayerInfo[playerid][pIsAtHouse])
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(giveplayerid, X,Y,Z);
SetPlayerCheckpoint(playerid, X,Y,Z, 6);
}
else
{
new h = PlayerInfo[playerid][pIsAtHouse];
SetPlayerCheckpoint(playerid, HouseInfo[h][hEntrancex],HouseInfo[h][hEntrancex],HouseInfo[h][hEntrancex], 6);
}
Or, I don't understand what you mean at all
Re: Help with /find command -
Improvement™ - 29.08.2011
Well, or you just can check if player2 is not in the same interior as the player that has executed the /find command.
pawn Код:
if(GetPlayerInterior(playerid) == GetPlayerInterior(playerid2))
{
return SendClientMessage(playerid, COLOR_RED, "This player is currently inside a store or apartment.");
}
Change the (playerid2) into the variable in which the second playerid is saved.
Re: Help with /find command -
qUick1337 - 29.08.2011
Quote:
Originally Posted by AndreT
I assume the house ID the player is in is stored in PlayerInfo[playerid][pIsAtHouse]?
Then you don't need a loop!
pawn Код:
if(!PlayerInfo[playerid][pIsAtHouse]) { new Float:X,Float:Y,Float:Z; GetPlayerPos(giveplayerid, X,Y,Z); SetPlayerCheckpoint(playerid, X,Y,Z, 6); } else { new h = PlayerInfo[playerid][pIsAtHouse]; SetPlayerCheckpoint(playerid, HouseInfo[h][hEntrancex],HouseInfo[h][hEntrancex],HouseInfo[h][hEntrancex], 6); }
Or, I don't understand what you mean at all 
|
I assume the house ID the player is in is stored in PlayerInfo[playerid][pIsAtHouse] - True... but is not working when im in a house the checkpoint appear in LV Airport

and the entrace of the house is in LS..
Quote:
Originally Posted by Improvement™
Well, or you just can check if player2 is not in the same interior as the player that has executed the /find command.
pawn Код:
if(GetPlayerInterior(playerid) == GetPlayerInterior(playerid2)) { return SendClientMessage(playerid, COLOR_RED, "This player is currently inside a store or apartment."); }
Change the (playerid2) into the variable in which the second playerid is saved.
|
I don't understand that :-s i want to put a checkpoint of the entrance if player is in house, not sendclientmessage...
Re: Help with /find command -
qUick1337 - 29.08.2011
up... no one can help me ?
Re: Help with /find command -
Jack_Wilson - 29.08.2011
I don't understand you, why would you even want to find a person in a home, just make it return SendClientMessage(playerid, 0xFFFFFF, "This person is inside a home.");
It's never going to give you a good accurate position if they're inside an interior.
Re: Help with /find command -
qUick1337 - 29.08.2011
I wanna make it for cops.. when a player have wanted and he enter in house and the cops have /ram command and if the checkpoint appear at house entrance this will be more easy for cops...
Re: Help with /find command -
=WoR=Varth - 30.08.2011
Do you have ID for your each house?
Re: Help with /find command -
qUick1337 - 30.08.2011
hmm no, but the id i think can be IsAtHouse or Virtual World