[HELP] /Exit command.
#2

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

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


Messages In This Thread
[HELP] /Exit command. - by HY - 02.02.2015, 19:53
Re: [HELP] /Exit command. - by M4D - 02.02.2015, 19:59
Re: [HELP] /Exit command. - by HY - 02.02.2015, 20:06
Re: [HELP] /Exit command. - by M4D - 02.02.2015, 20:15

Forum Jump:


Users browsing this thread: 1 Guest(s)