28.03.2015, 00:31
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 i = 0; i < sizeof(HouseInfo); i++)
{
if (PlayerToPoint(3, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
{
if(PlayerInfo[playerid][pPhousekey] == i || 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", 4000, 4);
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", 4000, 4);
}
}
}
// ulaz u stanove ********************************************************
for(new i = 0; i < sizeof(StanInfo); i++)
{
if (PlayerToPoint(3, playerid,StanInfo[i][sEntrancex], StanInfo[i][sEntrancey], StanInfo[i][sEntrancez]))
{
if(PlayerInfo[playerid][pPstankey] == i || 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", 5000, 1);
StanEntered[playerid] = i;
}
else
{
GameTextForPlayer(playerid, "~r~Zakljucano", 5000, 1);
}
}
}
// *****************************************************************************
for(new i = 0; i < sizeof(BizzInfo); i++)
{
if (PlayerToPoint(3, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
{
if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerMoney(playerid) >= BizzInfo[i][bEntranceCost])
{
if(PlayerInfo[playerid][pPbiskey] != i)
{
if(BizzInfo[i][bLocked] == 1)
{
GameTextForPlayer(playerid, "~w~Firma ~r~zatvorena", 4000, 4);
return 1;
}
if(BizzInfo[i][bProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Nemamo vise zaliha", 5000, 4);
return 1;
}
if (PlayerToPoint(3.0, playerid,1199.323974,-918.954528,43.116638))
{
OnPlayerEnterFood(playerid, 5);
}
else if (PlayerToPoint(3.0, playerid,811.321411,-1616.181030,13.546875))
{
OnPlayerEnterFood(playerid, 6);
}
else if (PlayerToPoint(3.0, playerid,927.906250,-1352.942626,13.343750))
{
OnPlayerEnterFood(playerid, 7);
}
GivePlayerMoney(playerid,-BizzInfo[i][bEntranceCost]);
format(string, sizeof(string), "~r~-$%d~n~~w~kucajte /exit~n~da izadjete", BizzInfo[i][bEntranceCost]);
BizzInfo[i][bTill] += BizzInfo[i][bEntranceCost];
ExtortionBiz(i, BizzInfo[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(playerid, dood, sizeof(dood));
format(string, sizeof(string), "%s je platio $%d da bi usao u firmu %d", dood, BizzInfo[i][bEntranceCost], i);
printf("%s", string);
PayLog(string);
}
else
{
GameTextForPlayer(playerid, "~r~Nemate dovoljno novca", 5000, 1);
}
}
}
// *****************************************************************************************
if (PlayerToPoint(4, playerid,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(tmpcar, 2062.1294,-1831.5498,13.5469);
SetVehicleZAngle(tmpcar, 90);
GivePlayerMoney(playerid, - SBizzInfo[34][sbEntranceCost]);
SBizzInfo[34][sbTill] += SBizzInfo[34][sbEntranceCost];
SBizzInfo[34][sbProducts]--;
SetTimerEx("AfterSpray1", 5000, false, "i", playerid);
}
else
{
GameTextForPlayer(playerid, "~r~Nemamo vise zaliha", 5000, 1);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Nemate dovoljno novca da udjete u Pay & Spray.");
}
}
}
else if (PlayerToPoint(4, playerid,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(tmpcar, 1024.9763,-1021.8850,32.1016);
SetVehicleZAngle(tmpcar, 0);
GivePlayerMoney(playerid, - SBizzInfo[32][sbEntranceCost]);
SBizzInfo[32][sbTill] += SBizzInfo[32][sbEntranceCost];
SBizzInfo[32][sbProducts]--;
SetTimerEx("AfterSpray2", 5000, false, "i", playerid);
}
else
{
GameTextForPlayer(playerid, "~r~Nemamo vise zaliha", 5000, 1);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Nemate dovoljno novca da udjete u Pay & Spray.");
}
}
}
else if (PlayerToPoint(4, playerid,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(tmpcar, 487.4099,-1741.4585,11.1330);
SetVehicleZAngle(tmpcar, 180);
GivePlayerMoney(playerid, - SBizzInfo[33][sbEntranceCost]);
SBizzInfo[33][sbTill] += SBizzInfo[33][sbEntranceCost];
SBizzInfo[33][sbProducts]--;
SetTimerEx("AfterSpray3", 5000, false, "i", playerid);
}
else
{
GameTextForPlayer(playerid, "~r~Nemamo vise zaliha", 5000, 1);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Nemate dovoljno novca da udjete u Pay & Spray.");
}
}
}
else if (PlayerToPoint(4, playerid,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(tmpcar, 720.3924,-456.0286,16.3359);
SetVehicleZAngle(tmpcar, 0);
GivePlayerMoney(playerid, - SBizzInfo[5][sbEntranceCost]);
SBizzInfo[5][sbTill] += SBizzInfo[5][sbEntranceCost];
SBizzInfo[5][sbProducts]--;
SetTimerEx("AfterSpray4", 5000, false, "i", playerid);
}
else
{
GameTextForPlayer(playerid, "~r~Nemamo vise zaliha", 5000, 1);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Nemate dovoljno novca da udjete u Pay & Spray.");
}
}
}
}
return 1;
}