Szerző Téma: /enter | SetPlayerPos  (Megtekintve 480 alkalommal)

/enter | SetPlayerPos
« Dátum: 2012. február 26. - 17:05:38 »
0 Show voters
Sziasztok, elég érdekes bugot találtunk ma, teljesen véletlenül.
Van az /enter parancs amivel be lehet menni az épületekbe, de észrevettük ,hogy a 90%-ba mégsem.
Enter parancs:
 

if(strcmp(cmd, \"/enter\", true) == 0)
{
    if(IsPlayerConnected(playerid))
{
   for(new i = 0; i < sizeof(HouseInfo); i++)
   {
      if (PlayerToPoint(3, playerid,HouseInfo[hEntrancex], HouseInfo[hEntrancey], HouseInfo[hEntrancez]))
      {
         //printf(\"Found House :%d\",i);
         if(PlayerInfo[playerid][pPhousekey] == i || HouseInfo[hLock] == 0)
         {
            SetPlayerInterior(playerid,HouseInfo[hInt]);
            SetPlayerVirtualWorld(playerid,HouseInfo[hWorld]);
            SetPlayerPos(playerid,HouseInfo[hExitx],HouseInfo[hExity],HouseInfo[hExitz]);
            GameTextForPlayer(playerid, \"~w~Otthon\", 5000, 1);
            PlayerInfo[playerid][pInt] = HouseInfo[hInt];
            PlayerInfo[playerid][pLocal] = i;
            HouseEntered[playerid] = i;
         }
         else
         {
            GameTextForPlayer(playerid, \"~r~Zárva\", 5000, 1);
         }
      }
   }
   for(new i = 0; i < sizeof(BizzInfo); i++)
   {
      if (PlayerToPoint(3, playerid,BizzInfo[bEntranceX], BizzInfo[bEntranceY], BizzInfo[bEntranceZ]))
      {
         //printf(\"Found House :%d\",i);
         if(!IsACop(playerid) && i == 3)
         {
             SendClientMessage(playerid, COLOR_GREY, \"   Csak rendõrök !\");
             return 1;
         }
         if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerMoney(playerid) >= BizzInfo[bEntranceCost])
         {
            if(PlayerInfo[playerid][pPbiskey] != i)
            {
               if(BizzInfo[bLocked] == 1)
               {
                  GameTextForPlayer(playerid, \"~r~Zárva\", 5000, 1);
                  return 1;
               }
               if(BizzInfo[bProducts] == 0)
               {
                  GameTextForPlayer(playerid, \"~r~Elfogyott\", 5000, 1);
                  return 1;
               }
               SafeGivePlayerMoney(playerid,-BizzInfo[bEntranceCost]);
               format(string, sizeof(string), \"~r~-$%d~n~~w~ /exit~n~hogy kimenj\", BizzInfo[bEntranceCost]);
               BizzInfo[bTill] += BizzInfo[bEntranceCost];
               ExtortionBiz(i, BizzInfo[bEntranceCost]);
               BizzInfo[bProducts]--;
               OnPropUpdate();
               GameTextForPlayer(playerid, string, 5000, 3);
            }
            SetPlayerInterior(playerid,BizzInfo[bInterior]);
            SetPlayerPos(playerid,BizzInfo[bExitX],BizzInfo[bExitY],BizzInfo[bExitZ]);
            PlayerInfo[playerid][pInt] = BizzInfo[bInterior];
            PlayerInfo[playerid][pLocal] = i+99;
            new dood[MAX_PLAYER_NAME];
            GetPlayerName(playerid, dood, sizeof(dood));
            format(string, sizeof(string), \"%s fizetett $%d bizbe %d\", dood, BizzInfo[bEntranceCost], i);
            printf(\"%s\", string);
            PayLog(string);
            //PlayerInfo[playerid][pLocal] = i;
         }
         else
         {
            GameTextForPlayer(playerid, \"~r~Nincs rá pénzed\", 5000, 1);
         }
      }
   }
   for(new i = 0; i < sizeof(SBizzInfo); i++)
   {
      if (PlayerToPoint(3, playerid,SBizzInfo[sbEntranceX], SBizzInfo[sbEntranceY], SBizzInfo[sbEntranceZ]))
      {
         if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerMoney(playerid) >= SBizzInfo[sbEntranceCost])
         {
            if(PlayerInfo[playerid][pPbiskey] != i)
            {
               if(SBizzInfo[sbLocked] == 1)
               {
                  GameTextForPlayer(playerid, \"~r~Zárva\", 5000, 1);
                  return 1;
               }
               if(SBizzInfo[sbProducts] == 0)
               {
                  GameTextForPlayer(playerid, \"~r~Elfogyott\", 5000, 1);
                  return 1;
               }
               if(i == 10)
               {
                   PaintballPlayers ++;
                   PlayerPaintballing[playerid] = 1;
                   new rand = random(sizeof(PaintballSpawns));
                  SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]);
                  TogglePlayerControllable(playerid, 0);
               }
               else if(i == 11)
               {
                   PlayerKarting[playerid] = 1;
                   SendClientMessage(playerid, TEAM_GROVE_COLOR, \"vmi\");
               }
               else
               {
                   return 1;
               }
               SafeGivePlayerMoney(playerid,-SBizzInfo[sbEntranceCost]);
               gSpentCash[playerid] = GetPlayerMoney(playerid);
               SBizzInfo[sbProducts]--;
               SBizzInfo[sbTill] += SBizzInfo[sbEntranceCost];
               ExtortionSBiz(i, SBizzInfo[sbEntranceCost]);
               new dood[MAX_PLAYER_NAME];
               GetPlayerName(playerid, dood, sizeof(dood));
               format(string, sizeof(string), \"%s payed $%d to enter sbiz %d\", dood, SBizzInfo[sbEntranceCost], i);
               printf(\"%s\", string);
               PayLog(string);
               OnPropUpdate();
            }
         }
         else
         {
            GameTextForPlayer(playerid, \"~r~nincs pénzed rá\", 5000, 1);
         }
      }
   }
   if(PlayerToPoint(3.0,playerid,2730.7051,-2451.4802,17.5937))
   {
   GameTextForPlayer(playerid,\"~g~Katonasag radarszoba\", 5000, 1);
   SetPlayerInterior(playerid,0);
   PlayerInfo[playerid][pInt] = 0;
   SetPlayerPos(playerid,227.5788,1822.3998,7.4141);
   }
   else if(PlayerToPoint(3.0, playerid,2315.6497,-0.3489,26.7422))
   {
   if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 6 ||
   PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15 || PlayerInfo[playerid][pLeader] == 20)
   {
       GameTextForPlayer(playerid, \"~r~Páncélterem\", 5000, 1);
       SetPlayerInterior(playerid,1);
       PlayerInfo[playerid][pInt] = 1;
      SetPlayerPos(playerid,2167.8464,1618.8093,999.9778);
      SendRadioMessage(1, COLOR_DBLUE, \"Valaki lement a Bank páncéltermébe,lehet,hogy rablás készülõdik??!\");
      SendRadioMessage(2, COLOR_DBLUE, \"Valaki lement a Bank páncéltermébe,lehet,hogy rablás készülõdik??!\");
      SendRadioMessage(3, COLOR_DBLUE, \"Valaki lement a Bank páncéltermébe,lehet,hogy rablás készülõdik??!\");
      printf(\"Valaki lement SF bank panceltermébe.\");
      }
      else if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 ||
   PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pLeader] == 20)
   {
       GameTextForPlayer(playerid, \"~w~Páncélterem\", 5000, 1);
       SetPlayerInterior(playerid,1);
       PlayerInfo[playerid][pInt] = 1;
      SetPlayerPos(playerid,2167.8464,1618.8093,999.9778);
      }
   }
else if(PlayerToPoint(3.0, playerid,-217.4594,978.9748,19.5016))
{//SFPD Be
GameTextForPlayer(playerid, \"~w~Rendõrség\", 5000, 1);
SetPlayerInterior(playerid, 6);
SetPlayerPos(playerid,242.7770,66.7199,1003.6406);
PlayerInfo[playerid][pInt] = 6;
}
else if(PlayerToPoint(3.0, playerid,-2453.924561, 503.588196, 29.278372))
{//BÖRTÖN BE
GameTextForPlayer(playerid, \"~w~San Fierro\", 5000, 1);
SetPlayerInterior(playerid, 6);
SetPlayerPos(playerid,-2437.859131, 491.279724, 22.515482);
PlayerInfo[playerid][pInt] = 0;
}
else if(PlayerToPoint(3.0, playerid,-2270.1958,-155.8746,35.3203))
{//Ganton Gym
GameTextForPlayer(playerid, \"~w~Edzõterem\", 5000, 1);
SetPlayerInterior(playerid, 5);
SetPlayerPos(playerid,771.9399,-2.2574,1000.7292);
PlayerInfo[playerid][pInt] = 5;
}
//-----------------------------------------------------------------
else if(PlayerToPoint(3.0, playerid,-2016.8392,-37.9225,35.2976))
{//24/7 near PD Entrance
GameTextForPlayer(playerid, \"~w~24/7\", 5000, 1);
SetPlayerInterior(playerid, 6);
SetPlayerPos(playerid,-26.6916,-55.7149,1003.5469);
PlayerInfo[playerid][pInt] = 6;
}
else if(PlayerToPoint(3.0, playerid,-181.0784,1163.4692,19.3213))
{//24/7 near 8-ball entrance
GameTextForPlayer(playerid, \"~w~24/7\", 5000, 1);
SetPlayerInterior(playerid, 18);
SetPlayerPos(playerid,-30.9467,-89.6096,1003.5469);
PlayerInfo[playerid][pInt] = 18;
}
else if(PlayerToPoint(3.0, playerid,-2462.3535,132.5798,35.1719))
{//Olasz étterem
GameTextForPlayer(playerid, \"~g~Olasz étterem\", 5000, 1);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid,-2444.941406,159.538208,23.992693);
PlayerInfo[playerid][pInt] = 0;
}
else if(PlayerToPoint(3.0, playerid,-2521.3389,-624.9390,132.7833))
{//Club by me
GameTextForPlayer(playerid, \"~y~Night Club\", 5000, 1);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid,-2543.010986,-663.532349,115.302841);
PlayerInfo[playerid][pInt] = 0;
SendClientMessage(playerid, COLOR_YELLOW, \"A Biztonsági Õrök elvették a fegyvereid!\");
        ResetPlayerWeapons(playerid);
}
else if(PlayerToPoint(3.0, playerid,1315.4581,-897.6843,39.5781))
{//24/7 vinewood
SetPlayerVirtualWorld(playerid, 2);
PlayerInfo[playerid][pVirWorld] = 2;
GameTextForPlayer(playerid, \"~w~24/7\", 5000, 1);
SetPlayerInterior(playerid, 18);
SetPlayerPos(playerid,-30.9467,-89.6096,1003.5469);
PlayerInfo[playerid][pInt] = 18;
}
else if(PlayerToPoint(3.0, playerid,-2624.1265,1411.6913,7.0938))
{//JK Be
GameTextForPlayer(playerid, \"~w~Jizzy Klub\", 5000, 1);
SetPlayerInterior(playerid, 17);
SetPlayerPos(playerid,493.3891,-22.7212,1000.6797);
PlayerInfo[playerid][pInt] = 17;
}
else if(PlayerToPoint(3.0, playerid,-179.8314,1133.1055,19.3082))
{//Binco next to 10 green
GameTextForPlayer(playerid, \"~w~Binco\", 5000, 1);
SendClientMessage(playerid, COLOR_GREEN, \"Írd be /ruha ,civil ruha vásárláshoz!\");
SetPlayerInterior(playerid, 15);
SetPlayerPos(playerid,207.7336,-108.6231,1005.132);
PlayerInfo[playerid][pInt] = 15;
}
else if(PlayerToPoint(3.0, playerid,1000.5861,-919.8832,42.3281))
{//24/7 gas station
GameTextForPlayer(playerid, \"~w~24/7\", 5000, 1);
SetPlayerInterior(playerid, 4);
SetPlayerPos(playerid,-28.2619,-26.2015,1003.5573);
PlayerInfo[playerid][pInt] = 4;
}
else if(PlayerToPoint(3.0, playerid,-19.0235,1176.1471,19.5634))
{
//24-7
SetPlayerPos(playerid, -25.1326,-139.0670,1003.5469);
GameTextForPlayer(playerid, \"~w~Üdv a boltban!\",5000,3);
SetPlayerInterior(playerid,16);
PlayerInfo[playerid][pInt] = 16;
}
else if(PlayerToPoint(3.0, playerid,1298.7075,-798.5981,84.1406))
{
//Madd dog crip enter
        SetPlayerPos(playerid, 1254.3436,-789.3809,1084.0078);
GameTextForPlayer(playerid, \"~w~Yakuza HQ\",5000,1);
SetPlayerInterior(playerid,5);
PlayerInfo[playerid][pInt] = 5;
}
 
else if(PlayerToPoint(3.0, playerid,-318.9180,1048.4872,20.3403))
{
//Hospital enter
SetPlayerPos(playerid,  -2701.633545,771.189575,-57.901711);
GameTextForPlayer(playerid, \"~w~Kórház\",5000,1);
SetPlayerInterior(playerid,0);
SetPlayerFacingAngle(playerid, 0);
PlayerInfo[playerid][pInt] = 0;
}
else if(PlayerToPoint(3.0, playerid,1004.3004,-1431.6689,13.5469))
{
//The Triads HQ
if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)
{
   SetPlayerPos(playerid, 2350.2075,-1180.6775,1027.9766);
   GameTextForPlayer(playerid, \"~w~The Triads HQ\",5000,1);
   SetPlayerInterior(playerid,5);
   SetPlayerFacingAngle(playerid, 90);
   PlayerInfo[playerid][pInt] = 5;
}
else if(hqlock[surlock] == 0)
{
    SetPlayerPos(playerid, 2350.2075,-1180.6775,1027.9766);
   GameTextForPlayer(playerid, \"~w~The Triads HQ\",5000,1);
   SetPlayerInterior(playerid,5);
   SetPlayerFacingAngle(playerid, 90);
   PlayerInfo[playerid][pInt] = 5;
}
else
{
    GameTextForPlayer(playerid, \"~r~Zárva\",5000,1);
}
}
else if(PlayerToPoint(3.0, playerid,-207.5758,1119.3544,20.4297))
{
//City hall
SetPlayerPos(playerid, -1455.015503,918.745667, 8.488868);
GameTextForPlayer(playerid, \"~w~Városháza\",5000,1);
SetPlayerInterior(playerid,0);
SetPlayerFacingAngle(playerid, 0);
PlayerInfo[playerid][pInt] = 0;
}
else if(PlayerToPoint(3.0, playerid,-179.6573,1177.4955,19.8909))
{
//Lottozo
SetPlayerPos(playerid, 832.3849,6.9472,1004.1797);
GameTextForPlayer(playerid, \"~w~Lottozó\",5000,1);
SetPlayerInterior(playerid,3);
SetPlayerFacingAngle(playerid, 0);
PlayerInfo[playerid][pInt] = 3;
}
else if(PlayerToPoint(3.0, playerid,-2764.8718,376.0660,6.3422))
{
//Riporter Stúdió
SetPlayerPos(playerid, -2767.8806,372.8571,-3.0813);
GameTextForPlayer(playerid, \"~w~Riporter Stúdió\",5000,1);
SetPlayerInterior(playerid,0);
SetPlayerFacingAngle(playerid, 0);
PlayerInfo[playerid][pInt] = 0;
}
else if(PlayerToPoint(3.0, playerid,-176.4347,1111.8588,19.7422))
{
//Szalloda enter
SetPlayerPos(playerid, 2217.2461,-1150.5100,1025.7969);
SetPlayerInterior(playerid,15);
SetPlayerFacingAngle(playerid, 0);
PlayerInfo[playerid][pInt] = 15;
}
else if(PlayerToPoint(3.0, playerid,-1968.2733,110.2984,27.6875))
{
//LA Yellow Cab Co.
SetPlayerPos(playerid, 371.8502,182.0368,1014.1875);
GameTextForPlayer(playerid, \"~w~Taxi állomas\",5000,1);
SetPlayerInterior(playerid,3);
SetPlayerFacingAngle(playerid, 0);
PlayerInfo[playerid][pInt] = 3;
}
else if(PlayerToPoint(3.0, playerid,-2026.4850,-101.4550,35.1641))
{
//DMW
SetPlayerPos(playerid, 1494.6207,1305.2336,1093.2891);
GameTextForPlayer(playerid, \"~w~Oktató Iskola\",5000,1);
SetPlayerInterior(playerid,3);
SetPlayerFacingAngle(playerid, 0);
PlayerInfo[playerid][pInt] = 3;
}
else if(PlayerToPoint(3.0, playerid,1524.5724,-1677.8043,6.2188))
{
    //PD Elevator
    SetPlayerPos(playerid, 244.0099,66.4152,1003.6406);
    GameTextForPlayer(playerid, \"~w~Rendõrség\",5000,1);
    SetPlayerInterior(playerid,6);
    SetPlayerFacingAngle(playerid, 270);
PlayerInfo[playerid][pInt] = 6;
}
else if(PlayerToPoint(3.0, playerid,1557.7257,-1675.2711,28.3955))
{
    //PD Elevator
    SetPlayerPos(playerid, 244.0099,66.4152,1003.6406);
    GameTextForPlayer(playerid, \"~w~Rendõrség\",5000,1);
    SetPlayerInterior(playerid,6);
    SetPlayerFacingAngle(playerid, 270);
PlayerInfo[playerid][pInt] = 6;
}
else if(PlayerToPoint(3.0, playerid,1570.3828,-1333.8882,16.4844))
{  //Next to PD building
    SetPlayerPos(playerid, 1545.0068,-1366.5094,327.2868);
    GameTextForPlayer(playerid, \"~w~Roof of News building\",5000,1);
    SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
else if(PlayerToPoint(3.0, playerid,1570.3828,-1333.8882,16.4844))
{
    //Next to PD building
    SetPlayerPos(playerid, 1545.0068,-1366.5094,327.2868);
    GameTextForPlayer(playerid, \"~w~Roof of News building\",5000,1);
    SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
else if(PlayerToPoint(3.0, playerid,2398.6240,-1899.2014,13.5469))
{//Cluckin Bell near 10 green
SetPlayerVirtualWorld(playerid, 2);
PlayerInfo[playerid][pVirWorld] = 2;
OnPlayerEnterFood(playerid, 1);
}
}
return 1;
}

 
Ez:
 

else if(PlayerToPoint(3.0, playerid,-2016.8392,-37.9225,35.2976))
{//24/7 near PD Entrance
GameTextForPlayer(playerid, \"~w~24/7\", 5000, 1);
SetPlayerInterior(playerid, 6);
SetPlayerPos(playerid,-26.6916,-55.7149,1003.5469);
PlayerInfo[playerid][pInt] = 6;
}

 
mûködik.
Az alatta lévõ
 

else if(PlayerToPoint(3.0, playerid,-181.0784,1163.4692,19.3213))
{//24/7 near 8-ball entrance
GameTextForPlayer(playerid, \"~w~24/7\", 5000, 1);
SetPlayerInterior(playerid, 18);
SetPlayerPos(playerid,-30.9467,-89.6096,1003.5469);
PlayerInfo[playerid][pInt] = 18;
}

 
már nem.
Visszatöröltem dolgokat de így se lett jó. Mi lehet a hiba?
« Utoljára szerkesztve: 2012. február 26. - 17:09:04 írta Nocoxil »

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal