Rob Bank
#1

How to make cmd in ZCMD for robing bank, to rob on some coordinates and when to start robing first to wait 2minutes and then to give player money, i want to make go give player random money and when start robing to send message to other players that bank is robing, also to setplayer wanted level and bank can be robed every 3hours.
How to make this because am begginer ?
Reply
#2

pawn Код:
new RobBankAble = 3;
new RobbingBank[MAX_PLAYERS] = 120;
pawn Код:
CMD:robbank(playerid, params[])
{
    if(RobBankAble == 0)
    {
        RobbingBank[playerid] = 120;
        SendClientMessageToAll(-1, "The bank is being robbed.");
    }
}
Using YSI\y_timers:

pawn Код:
timer BankRobTimer[1000]()
{
    for(new i; i < MAX_PLAYERS; i++)
    {
        if(RobbingBank[i] > 0)
        {
            RobbingBank[i]--;
        }
    }
}

timer BankHourWait[3600]()
{
    if(RobBankAble > 0)
    {
        RobBankAble--;
    }
}
This is just a basic setup, I won't give you all the code straight up, you need to figure a little bit out on your own. Hope this helps.
Reply
#3

What mean 180 and 120 ? and i dont know how to setplayerwanted level an how to make random money /?
Reply
#4

Quote:
Originally Posted by Zumba
Посмотреть сообщение
What mean 180 and 120 ? and i dont know how to setplayerwanted level an how to make random money /?
You mean 3 and 120? And those are just integers assigned to the variables. They are set to decrease with the timers.

3 is interpreted as 3 hours.
120 is interpreted as 120 seconds.

The random money is in the timer, take a look.

Use:
pawn Код:
SetPlayerWantedLevel(playerid, level);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)