SA-MP Forums Archive
help me in makint dynamic rob points - 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 me in makint dynamic rob points (/showthread.php?tid=448442)



help me in makint dynamic rob points - drichie - 04.07.2013

can someone guide me how to make dynamic rob points where i can /rob each points itry to do it by my self but i failed
pawn Код:
CMD:rob(playerid,params[])
{
    for(new i=0; i<MAX_PICK; i++)
    {
        if(IsPlayerInRangeOfPoint(playerid,2,PickInfo[i][pX], PickInfo[i][pY], PickInfo[i][pZ]) && GetPlayerVirtualWorld(playerid) == PickInfo[i][pVw] && GetPlayerInterior(playerid) == PickInfo[i][pInt])
        {
            ApplyAnimation(playerid, "ROB_BANK", "CAT_SAFE_ROB", 4.0, 1, 0, 0,0, 1);
            robtime = SetTimer("robtimer",1000,true);
        }
        else
        {
            return SCM(playerid,-1,"You are not in a rob point");
        }
    }
    return 1;
}



Re: help me in makint dynamic rob points - Misiur - 04.07.2013

Using this code you'll get "You are not in a rob point" message MAX_PICK times. Put return if the player is in range of point, and the message about not being in range outside the loop.


Re: help me in makint dynamic rob points - drichie - 04.07.2013

come again? i didnt understand this part "Put return if the player is in range of point" can you edit the code i show?