02.02.2015, 19:59
it will teleport player to Exit position of ALL Houses !!
because you used it inside a loop without a condition !
you have to store house it which playerid entered, or with your loop get closest house id ...
i'll give you an example.
make a new player variable and when player uses /enter, swtore house id into it and use it for exit
because you used it inside a loop without a condition !
you have to store house it which playerid entered, or with your loop get closest house id ...
i'll give you an example.
make a new player variable and when player uses /enter, swtore house id into it and use it for exit
pawn Код:
new PHouseID[MAX_PLAYERS];
//inside "/enter" CMD:
PHouseID[playerid] = hid;
//hid is houseid that player entered.
CMD:iesi(playerid, params[])
{
new hid = PHouseID[playerid];
if(InHouse[playerid] == 1)
{
SetPlayerPos(playerid, CasaInfo[hid][cX], CasaInfo[hid][cY], CasaInfo[hid][cZ]);
SetPlayerInterior(playerid, 0);
SendClientMessage(playerid, -1, "{FF0000}[CASĂ]: {FFFFFF}Ai iesit dintr-o casă.");
}
return 1;
}