09.03.2014, 17:17
hey im trying to write a rob system into a script. I have applied a 10 sec timer and apllied animation, im stuck at trying to grab the business bank and take 75% give that to player and remove from biz bank. below should be everything to try and help me im getting error 017: tag mismatch and cant figure out what i have wrong.
thanks in advance for any help
pawn Код:
new in_biz[MAX_PLAYERS];
forward RobStore(playerid);
enum bInfo{
bID,
bOwner,
bOwnerName[256],
bPrice,
Float:bSpawnX,
Float:bSpawnY,
Float:bSpawnZ,
Float:bInteriorX,
Float:bInteriorY,
Float:bInteriorZ,
bInterior,
Text3D: bPickup,
bOpen,
bType,
Float:bVX,
Float:bVY,
Float:bVZ,
Float:bVR,
bBank,
bFuelPrice,
bName[256],
bBillTime,
bEntranceFee,
bLevel,
bStream[256]
}
new BizInfo[MAX_BIZES][bInfo];
public RobStore(playerid)
{
SetTimerEx("Rob",10000,false,"i",playerid);
ApplyAnimation(playerid,"PED","gang_gunstand",4.0,0,1,1,0,10000,1);
new biz = in_biz[playerid];
new loot =(BizInfo[biz][bBank] * 0.75); //THIS LINE IS GETTING THE TAG MISMATCH ERROR
GivePlayerMoney(playerid, loot);
BizInfo[biz][bBank] -= loot;
return 1;
}
COMMAND:rob(playerid, params[])
{
if(GetPlayerWeapon(playerid) > 22)
{
if(IsInStore(playerid))
{
RobStore(playerid);
SendClientMessage(playerid,COLOR_RED,"You have started robbing this store.");
return 1;
}
else
{
SendClientMessage(playerid,COLOR_RED,"You are not in a store.");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "You do not have a weapon.");
return 1;
}
}