help me in makint dynamic rob points
#1

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;
}
Reply
#2

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.
Reply
#3

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


Forum Jump:


Users browsing this thread: 2 Guest(s)