how to check if the player moved?
#1

how to check if the player moved or not in the point? and where do i put that code in this?....

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);
            rt = SetTimer("robtimer",1000,true);
            return 1;
        }
    }
    return 1;
}
forward robtimer(playerid);
public robtimer(playerid)
{
    CountDownVar--;
    new str[128];
    format(str, sizeof(str), "Count Down: %d",CountDownVar);
    GameTextForPlayer(playerid,str,1000,6);
    for(new i=0; i<MAX_PICK; i++)
    {
        if(CountDownVar == 0)
        {
            new rand = random(999);
            GiveDrichMoney(playerid,rand);
            format(str,128," %s has robbed %i",GetName(playerid),rand);
            SCM(playerid,-1,str);
            ClearAnimations(playerid);
            KillTimer(rt);
            CountDownVar = 15;
            return 1;
         }
    }
    return 1;
}
Reply


Messages In This Thread
how to check if the player moved? - by drichie - 05.07.2013, 13:08
Re: how to check if the player moved? - by Sasino97 - 05.07.2013, 13:11
Re: how to check if the player moved? - by drichie - 05.07.2013, 13:21
Full code - by Sasino97 - 05.07.2013, 13:46
Re: how to check if the player moved? - by drichie - 05.07.2013, 13:50
Re: how to check if the player moved? - by Sasino97 - 05.07.2013, 13:53
Re: how to check if the player moved? - by drichie - 05.07.2013, 14:05

Forum Jump:


Users browsing this thread: 1 Guest(s)