Advertisement
FanHamMer

command enter

Feb 14th, 2013
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.08 KB | None | 0 0
  1. CMD:henter(playerid, params[])
  2. {
  3.     for(new id = 0; id < MAX_HOUSE; id++)
  4.     {
  5.         new type = hInfo[id][hType];
  6.         if(IsPlayerInRangeOfPoint(playerid, 3.0, hInfo[id][hPos][0], hInfo[id][hPos][1], hInfo[id][hPos][2])) //Вход в дома
  7.         {
  8.             SetPlayerPos(playerid, intHouse[type][ihX], intHouse[type][ihY], intHouse[type][ihZ]);
  9.             SetPlayerInterior(playerid, intHouse[type][ihInt]);
  10.             SetPlayerVirtualWorld(playerid, hInfo[id][hID]);
  11.             SetPVarInt(playerid, "CurrentHouse", id);
  12.         }
  13.         else if(IsPlayerInRangeOfPoint(playerid, 3.0, intHouse[type][ihX], intHouse[type][ihY], intHouse[type][ihZ])) //Вход в дома
  14.         {
  15.             /*SetPlayerPos(playerid, hInfo[id][hPos][0], hInfo[id][hPos][1], hInfo[id][hPos][2]);
  16.             SetPlayerInterior(playerid, 0);
  17.             SetPlayerVirtualWorld(playerid, 0);*/
  18.             if(GetPVarInt(playerid, "CurrentHouse") >= 0)
  19.             {
  20.                 SetPlayerPos(playerid, hInfo[id][hPos][0], hInfo[id][hPos][1], hInfo[id][hPos][2]);
  21.                 SetPlayerInterior(playerid, 0);
  22.                 SetPlayerVirtualWorld(playerid, 0);
  23.                 DeletePVar(playerid, "CurrentHouse");
  24.             }
  25.         }
  26.     }
  27.     return 1;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement