Interior Objects Problem
#3

I have added them as businesses, here is /enter command code for biz.

Quote:

for(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, "~r~Closed", 5000, 1);
return 1;
}
if(BizzInfo[i][bProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
return 1;
}
SafeGivePlayerMoney(playerid,-BizzInfo[i][bEntranceCost]);
format(string, sizeof(string), "~r~-$%d~n~~w~type /exit~n~to get out", BizzInfo[i][bEntranceCost]);
BizzInfo[i][bTill] += BizzInfo[i][bEntranceCost];
ExtortionBiz(i, BizzInfo[i][bEntranceCost]);
BizzInfo[i][bProducts]--;
//OnPropUpdate();
SaveSQLBizz(i+1);
GameTextForPlayer(playerid, string, 5000, 3);
}
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 payed $%d to enter biz %d", dood, BizzInfo[i][bEntranceCost], i);
printf("%s", string);
PayLog(string);
//PlayerInfo[playerid][pLocal] = i;
}
else
{
GameTextForPlayer(playerid, "~r~You dont have the cash", 5000, 1);
}
}
}
Reply


Messages In This Thread
Interior Objects Problem - by GeorgeBrown - 25.06.2012, 16:49
Re: Interior Objects Problem - by MarTaTa - 25.06.2012, 16:50
Re: Interior Objects Problem - by GeorgeBrown - 25.06.2012, 16:54
Re: Interior Objects Problem - by MarTaTa - 25.06.2012, 16:56
Respuesta: Interior Objects Problem - by CidadeNovaRP - 25.06.2012, 17:05
Re: Interior Objects Problem - by paulor - 25.06.2012, 17:51
Re: Interior Objects Problem - by GeorgeBrown - 25.06.2012, 17:56

Forum Jump:


Users browsing this thread: 1 Guest(s)