Help me to complete this robbank command
#1

pawn Код:
CMD:robbank(playerid, params[])
{
    if(!IsPlayerInRangeOfPoint(playerid, 15.0, 2308.7346, -11.0134, 26.7422))
    {
    SendClientMessageEx(playerid, COLOR_GRAD1, "You aren't at bank!");
    return 1;
    }
    if(PlayerInfo[playerid][pFreezeBank] == 1) return SendClientMessageEx(playerid, COLOR_GREY, "Your bank is currently frozen");
    new family = PlayerInfo[playerid][pFMember];
    new rank = PlayerInfo[playerid][pRank];
    new giveplayerid;
    if(rank < 5) {
    SendClientMessageEx(playerid, COLOR_GRAD2, "You have to be at least Rank 5 to rob a bank");
    WantedPoints[giveplayerid] += 5;
    return 1;
    }
    if(family == 255) {
    SendClientMessageEx(playerid, COLOR_GRAD2, "You are not in a family/gang, you can not rob banks");
    return 1;
    }
    new string[500];
    CreateProgressBar(258.00, 137.00, 131.50, 3.19, COLOR_GREEN, 100.0);
    format(string,sizeof(string), " %s is attempting to rob the bank.", GetPlayerNameEx(playerid));
    ProxDetector(70.0, playerid, string, COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED);
    SendClientMessageToAllEx(COLOR_LIGHTBLUE, "City alert: Bank is being robbed by someone!!!");
    return 1;
}
I dunno how to add timer for progress of robbing, i want to make something like that- when you type /robbank, you must be in family and with rank 5+, then when you /robbank inside bank it will show you progress bar and after 2 minutes, script shows player *Robbery COmpleted* and give the player 2000000$, help me please and -20000 $ to everyone's cash and sendclientmessagetoallex that you have lost 20000$ due to last bank robbery. please help brothers
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)