SA-MP Forums Archive
Help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help (/showthread.php?tid=545424)



Help - lwilson - 08.11.2014

Код:
if(BankJobPlayer == playerid)
	{
	    new string[182];
	    format(string, 256, "City Alert: The Bank Robbery attempt has failed!");
	    RemovePlayerAttachedObject(playerid, 0);
		SendClientMessageToAll(COLOR_LIGHTBLUE, string);
		BankJobPlayer = 999;
		TimeAfterBankJob = 3;
		BankJobTime = -1;
	}
How to Edit if the Player leave the Particular Place he will Fail to Rob the bank.


Re: Help - rickisme - 08.11.2014

try this ?

require Streamer plugins
pawn Код:
new Float:ParticularPlace[1][4] =
{
    // x  y    z    size
    {0.0, 0.0, 0.0, 10.0}
}
new RobZone = CreateDynamicSphere(ParticularPlace[0][0], ParticularPlace[0][1], ParticularPlace[0][2], ParticularPlace[0][3], GetPlayerVirtualWorld(playerid), GetPlayerInrerior(playerid));

public OnPlayerLeaveDynamicArea(playerid, areaid)
{
    if(areaid == RobZone)
    {
        if(BankJobPlayer == playerid)
        {
            new string[182];
            format(string, 256, "City Alert: The Bank Robbery attempt has failed!");
            RemovePlayerAttachedObject(playerid, 0);
            SendClientMessageToAll(COLOR_LIGHTBLUE, string);
            BankJobPlayer = 999;
            TimeAfterBankJob = 3;
            BankJobTime = -1;
        }
    }
}