24.05.2010, 11:27
Hey, y'all!
A new day has begun and a new problem has appeared as I tried to upgrade my script. I made an enter command for businesses, based on the LARP's one. Unfortunately, it is bugged, because it says that you are not at the business' entrance even if you are there. Do you have any ideas? (Yeah, it is messed up with the tabulators here, but it looks fine in pawno.)
A new day has begun and a new problem has appeared as I tried to upgrade my script. I made an enter command for businesses, based on the LARP's one. Unfortunately, it is bugged, because it says that you are not at the business' entrance even if you are there. Do you have any ideas? (Yeah, it is messed up with the tabulators here, but it looks fine in pawno.)
pawn Код:
if(strcmp("/enter", cmdtext, true) == 0)
{
for(new i = 0; i < sizeof(BizzInfo); i++)
{
if(IsPlayerInRangeOfPoint(3, playerid, BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
{
if(GetPVarInt(playerid, "BizOwner") == 1 || BizzInfo[i][bLocked] == 0)
{
if(GetPVarInt(playerid, "BizOwner") == 1 || GetPlayerMoney(playerid) >= BizzInfo[i][bEntranceCost])
{
GivePlayerMoney(playerid,-BizzInfo[i][bEntranceCost]);
BizzInfo[i][bTill] += BizzInfo[i][bEntranceCost];
SetPlayerVirtualWorld(playerid, BizzInfo[i][bVW]);
SetPlayerFacingAngle(playerid, BizzInfo[i][bExitAngle]);
SetPlayerInterior(playerid,BizzInfo[i][bInterior]);
SetPlayerPos(playerid,BizzInfo[i][bExitX],BizzInfo[i][bExitY],BizzInfo[i][bExitZ]);
SetPVarInt(playerid, "InBiz", i);
SetCameraBehindPlayer(playerid);
}
else
{
SendClientMessage(playerid, piros, "Nincs nбlad elйg pйnz.");
}
}
else
{
SendClientMessage(playerid, piros, "Az ьzlet zбrva van.");
}
}
else
{
SendClientMessage(playerid, piros, "Nem vagy bejбrat kцzelйben.");
}
}
return 1;
}