[Help] /enter biz i sbizz
#1

I use gamemode gtarp have a problem with the entrance to the biz when you want to go in server shuts it off.

PHP код:
      if(strcmp(cmd"/enter"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            for(new 
0sizeof(HouseInfo); i++)
            {
                if (
PlayerToPoint(3playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
                {
                    if(
PlayerInfo[playerid][pPhousekey] == || HouseInfo[i][hLock] == 0)
                    {
                        
SetPlayerInterior(playerid,HouseInfo[i][hInt]);
                        
SetPlayerVirtualWorld(playerid,HouseInfo[i][hWorld]);
                        
SetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]);
                        
GameTextForPlayer(playerid"~g~Dobrodosli kuci"40004);
                        
HouseInfo[playerid][hTimers] = 0;
                        
OnPropTextdrawUpdate();
                        
PlayerInfo[playerid][pInt] = HouseInfo[i][hInt];
                        
PlayerInfo[playerid][pLocal] = i;
                        
HouseEntered[playerid] = i;
                    }
                    else
                    {
                        
GameTextForPlayer(playerid"~r~Kuca ~w~Zakljucana"40004);
                    }
                }
            }
// ulaz u stanove       ********************************************************
            
for(new 0sizeof(StanInfo); i++)
            {
                if (
PlayerToPoint(3playerid,StanInfo[i][sEntrancex], StanInfo[i][sEntrancey], StanInfo[i][sEntrancez]))
                {
                    if(
PlayerInfo[playerid][pPstankey] == || StanInfo[i][sLock] == 0)
                    {
                        
SetPlayerInterior(playerid,StanInfo[i][sInt]);
                        
SetPlayerVirtualWorld(playerid,StanInfo[i][sWorld]);
                        
SetPlayerPos(playerid,StanInfo[i][sExitx],StanInfo[i][sExity],StanInfo[i][sExitz]);
                        
GameTextForPlayer(playerid"~w~Dobrodosli u stan"50001);
                        
StanEntered[playerid] = i;
                    }
                    else
                    {
                        
GameTextForPlayer(playerid"~r~Zakljucano"50001);
                    }
                }
            }
// *****************************************************************************
            
for(new 0sizeof(BizzInfo); i++)
            {
                if (
PlayerToPoint(3playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
                {
                    if(
PlayerInfo[playerid][pPbiskey] == || GetPlayerMoney(playerid) >= BizzInfo[i][bEntranceCost])
                    {
                        if(
PlayerInfo[playerid][pPbiskey] != i)
                        {
                            if(
BizzInfo[i][bLocked] == 1)
                            {
                                
GameTextForPlayer(playerid"~w~Firma ~r~zatvorena"40004);
                                return 
1;
                            }
                            if(
BizzInfo[i][bProducts] == 0)
                            {
                                
GameTextForPlayer(playerid"~r~Nemamo vise zaliha"50004);
                                return 
1;
                            }
                            if (
PlayerToPoint(3.0playerid,1199.323974,-918.954528,43.116638))
                            {
                                
OnPlayerEnterFood(playerid5);
                            }
                            else if (
PlayerToPoint(3.0playerid,811.321411,-1616.181030,13.546875))
                            {
                                
OnPlayerEnterFood(playerid6);
                            }
                            else if (
PlayerToPoint(3.0playerid,927.906250,-1352.942626,13.343750))
                            {
                                
OnPlayerEnterFood(playerid7);
                            }
                            
GivePlayerMoney(playerid,-BizzInfo[i][bEntranceCost]);
                            
format(stringsizeof(string), "~r~-$%d~n~~w~kucajte /exit~n~da izadjete"BizzInfo[i][bEntranceCost]);
                            
BizzInfo[i][bTill] += BizzInfo[i][bEntranceCost];
                            
ExtortionBiz(iBizzInfo[i][bEntranceCost]);
                            
BizzInfo[i][bProducts]--;
                            
OnPropUpdate();
                        }
                        
SetPlayerInterior(playerid,BizzInfo[i][bInterior]);
                        
SetPlayerPos(playerid,BizzInfo[i][bExitX],BizzInfo[i][bExitY],BizzInfo[i][bExitZ]);
                        
PlayerInfo[playerid][pInt] = BizzInfo[i][bInterior];
                        
PlayerInfo[playerid][pLocal] = i+99;
                        new 
dood[MAX_PLAYER_NAME];
                        
GetPlayerName(playeriddoodsizeof(dood));
                        
format(stringsizeof(string), "%s je platio $%d da bi usao u firmu %d"doodBizzInfo[i][bEntranceCost], i);
                        
printf("%s"string);
                        
PayLog(string);
                    }
                    else
                    {
                        
GameTextForPlayer(playerid"~r~Nemate dovoljno novca"50001);
                    }
                }
            }
// *****************************************************************************************
            
if (PlayerToPoint(4playerid,2073.2979,-1831.1228,13.5469))
            { 
// Pay & Spray kod PIZZA Sbizz 57
                
if(GetPlayerState(playerid) == 2)
                {
                    if(
GetPlayerMoney(playerid) > SBizzInfo[34][sbEntranceCost] + 100)
                    {
                        if(
SBizzInfo[34][sbProducts] > 0)
                        {
                               new 
tmpcar GetPlayerVehicleID(playerid);
                            
SetVehiclePos(tmpcar2062.1294,-1831.5498,13.5469);
                            
SetVehicleZAngle(tmpcar90);
                            
GivePlayerMoney(playerid, - SBizzInfo[34][sbEntranceCost]);
                            
SBizzInfo[34][sbTill] += SBizzInfo[34][sbEntranceCost];
                            
SBizzInfo[34][sbProducts]--;
                            
SetTimerEx("AfterSpray1"5000false"i"playerid);
                        }
                        else
                        {
                            
GameTextForPlayer(playerid"~r~Nemamo vise zaliha"50001);
                        }
                    }
                    else
                    {
                        
SendClientMessage(playeridCOLOR_GREY"Nemate dovoljno novca da udjete u Pay & Spray.");
                    }
                }
            }
            else if (
PlayerToPoint(4playerid,1024.9756,-1030.7930,32.0257))
            { 
// Pay & Spray BURG Sbizz 55
                
if(GetPlayerState(playerid) == 2)
                {
                    if(
GetPlayerMoney(playerid) > SBizzInfo[32][sbEntranceCost] + 100)
                    {
                        if(
SBizzInfo[32][sbProducts] > 0)
                        {
                               new 
tmpcar GetPlayerVehicleID(playerid);
                            
SetVehiclePos(tmpcar1024.9763,-1021.8850,32.1016);
                            
SetVehicleZAngle(tmpcar0);
                            
GivePlayerMoney(playerid, - SBizzInfo[32][sbEntranceCost]);
                            
SBizzInfo[32][sbTill] += SBizzInfo[32][sbEntranceCost];
                            
SBizzInfo[32][sbProducts]--;
                            
SetTimerEx("AfterSpray2"5000false"i"playerid);
                        }
                        else
                        {
                            
GameTextForPlayer(playerid"~r~Nemamo vise zaliha"50001);
                        }
                    }
                    else
                    {
                        
SendClientMessage(playeridCOLOR_GREY"Nemate dovoljno novca da udjete u Pay & Spray.");
                    }
                }
            }
            else if (
PlayerToPoint(4playerid,488.3819,-1733.0563,11.1752))
            { 
// Pay & Spray PLAZA Sbizz
                
if(GetPlayerState(playerid) == 2)
                {
                    if(
GetPlayerMoney(playerid) > SBizzInfo[33][sbEntranceCost] + 100)
                    {
                        if(
SBizzInfo[33][sbProducts] > 0)
                        {
                               new 
tmpcar GetPlayerVehicleID(playerid);
                            
SetVehiclePos(tmpcar487.4099,-1741.4585,11.1330);
                            
SetVehicleZAngle(tmpcar180);
                            
GivePlayerMoney(playerid, - SBizzInfo[33][sbEntranceCost]);
                            
SBizzInfo[33][sbTill] += SBizzInfo[33][sbEntranceCost];
                            
SBizzInfo[33][sbProducts]--;
                            
SetTimerEx("AfterSpray3"5000false"i"playerid);
                        }
                        else
                        {
                            
GameTextForPlayer(playerid"~r~Nemamo vise zaliha"50001);
                        }
                    }
                    else
                    {
                        
SendClientMessage(playeridCOLOR_GREY"Nemate dovoljno novca da udjete u Pay & Spray.");
                    }
                }
            }
            else if (
PlayerToPoint(4playerid,719.8940,-464.8272,16.3359))
            { 
// Pay & Spray kod BIKERA Sbizz 5
                
if(GetPlayerState(playerid) == 2)
                {
                    if(
GetPlayerMoney(playerid) > SBizzInfo[5][sbEntranceCost] + 100)
                    {
                        if(
SBizzInfo[5][sbProducts] > 0)
                        {
                               new 
tmpcar GetPlayerVehicleID(playerid);
                            
SetVehiclePos(tmpcar720.3924,-456.0286,16.3359);
                            
SetVehicleZAngle(tmpcar0);
                            
GivePlayerMoney(playerid, - SBizzInfo[5][sbEntranceCost]);
                            
SBizzInfo[5][sbTill] += SBizzInfo[5][sbEntranceCost];
                            
SBizzInfo[5][sbProducts]--;
                            
SetTimerEx("AfterSpray4"5000false"i"playerid);
                        }
                        else
                        {
                            
GameTextForPlayer(playerid"~r~Nemamo vise zaliha"50001);
                        }
                    }
                    else
                    {
                        
SendClientMessage(playeridCOLOR_GREY"Nemate dovoljno novca da udjete u Pay & Spray.");
                    }
                }
            }
        }
        return 
1;
    } 
Reply


Messages In This Thread
[Help] /enter biz i sbizz - by Markoni990 - 28.03.2015, 00:31
Re: [Help] /enter biz i sbizz - by Crayder - 28.03.2015, 01:46
Respuesta: [Help] /enter biz i sbizz - by Markoni990 - 28.03.2015, 01:58
Re: [Help] /enter biz i sbizz - by Pottus - 28.03.2015, 01:59
Respuesta: [Help] /enter biz i sbizz - by Markoni990 - 28.03.2015, 02:16
Re: [Help] /enter biz i sbizz - by CalvinC - 28.03.2015, 10:03
Respuesta: [Help] /enter biz i sbizz - by Markoni990 - 28.03.2015, 15:20
Re: [Help] /enter biz i sbizz - by Konstantinos - 28.03.2015, 16:00
Respuesta: [Help] /enter biz i sbizz - by Markoni990 - 28.03.2015, 16:35
Respuesta: [Help] /enter biz i sbizz - by Markoni990 - 28.03.2015, 17:29

Forum Jump:


Users browsing this thread: 2 Guest(s)