SA-MP Forums Archive
Zone - 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: Zone (/showthread.php?tid=434298)



Zone - lsreskjn - 01.05.2013

Hey all, I want to create a little zone...I mean..if player is in that zone it will give him $10 each 2 seconds for example, is this possible?


Re: Zone - Pottus - 01.05.2013

Please note this solution requires the streamer plugin here https://sampforum.blast.hk/showthread.php?tid=102865
and foreach include here https://sampforum.blast.hk/showthread.php?tid=92679

pawn Код:
new MoneyArea;

OnGameModeInit()
{
    MoneyArea = CreateDynamicSphere(0.0, 0.0, 0.0, 3.0);
    SetTimer("CheckMoney", 1788, true);
}

forward CheckMoney()
public CheckMoney()
{
    foreach(new i : Player)
    {
        if(IsPlayerInDynamicArea(i)) GivePlayerMoney(i, 10);
    }
}



Re: Zone - lsreskjn - 01.05.2013

Thanks very much, and how to i get the coordinates i want only small box "zone"..


btw the first link doesnt work


Re: Zone - Pottus - 01.05.2013

Fixed the link, coord's are pretty easy to get you can type /save to save positions then just put in your min/max points when defining an area.


Re: Zone - lsreskjn - 01.05.2013

ok and witch one is it?

AddPlayerClass(217,1998.3448,1567.4259,15.3672,69. 3196,0,0,0,0,0,0); //
AddPlayerClass(217,2005.3358,1518.7369,17.0682,201 .5475,0,0,0,0,0,0); //