/robatm system help?
#2

Try This out cuz atmTimer[playerid]--; wont work i think so.. so setting the variable directly to 0 might work

pawn Код:
new atmTimer[MAX_PLAYERS];
new atmRobbing[MAX_PLAYERS];
new atmPlayTimer[MAX_PLAYERS];

CMD:robatm(playerid, params[])
{
    if(IsAtATM(playerid))
    {
        if(atmTimer[playerid] == 1)
        return SendClientMessage(playerid, COLOR_GRAD1,"You can only rob an atm every 15 minutes!");
        new Float: x, Float: y, Float: z;
        GetPlayerPos(playerid, x, y, z);
        SetAllCopCheckpoint(x,y,z,10);
        SendRadioMessage(1, COLOR_DBLUE, "[Dispatch]: All units be advised. ATM Robbery in progress, Coords relayed on your GPS!");
        SendRadioMessage(2, COLOR_DBLUE, "[Dispatch]: All units be advised. ATM Robbery in progress, Coords relayed on your GPS!");
        SendRadioMessage(3, COLOR_DBLUE, "[Dispatch]: All units be advised. ATM Robbery in progress, Coords relayed on your GPS!");
        TogglePlayerControllable(playerid, 0);
        atmRobbing[playerid] = SetTimerEx("robbingatm",30000,false,"d", playerid);
        return 1;
    }
    else
    {
        SendClientMessage(playerid, COLOR_GRAD1, "You are not at an ATM that can be robbed!");
        return 1;
    }
}

forward robbingatm(playerid);
public robbingatm(playerid)
{
    atmTimer[playerid]  = 1;
    new rrand = random(75000);
    GivePlayerMoney(playerid += rrand);
    SendClientMessageEx(playerid,COLOR_GREEN,"You Robbed $%d From the ATM",rrand);
    TogglePlayerControllable(playerid, 1);
    atmPlayTimer[playerid] = SetTimerEx("antiatmrob", 900000,false,"d",playerid);
    return 1;
}

forward antiatmrob(playerid);
public antiatmrob(playerid)
{
    atmTimer[playerid] = 0;
    return 1;
}
Reply


Messages In This Thread
/robatm system help? - by NewCityRoleplay - 01.11.2013, 05:58
Re: /robatm system help? - by -=Dar[K]Lord=- - 01.11.2013, 06:27

Forum Jump:


Users browsing this thread: 1 Guest(s)