How to add Chance ?
#7

Quote:
Originally Posted by azzerking
Посмотреть сообщение
Here is your code finished, though in future most people won't be as nice to do it for you. I hope you learn from what I have done, and actually apply it in the future.

Код:
CMD:robbery(playerid, params[])
{
    if(!IsPlayerInDynamicCP(playerid, CP_Warehouse)) return SendClientMessage(playerid, COLOR_RED,"You are not in a Warehouse Checkpoint!!");
    {
        if(Warehouserobbedrecently >=1) //checking if WArehouse has been robbed recently
        {
            SendClientMessage(playerid, COLOR_RED, "[ROBBERY]: Warehouse has been robbed recently"); // sending error message
        }

        new
            can_rob
        ;

        can_rob = random( 100 );

        switch( can_rob )
        {
            case 0 .. 49: // successful robbery
            {
                ROBBING_Warehouse[playerid] = 60; // setting the robbery timer
                SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid) +5);
                Warehouserobbedrecently = 200; // Time the players needs to wait for starting an another robbery in the same place

                return 1;
            }
            
            default:
            {
                // send error message
            }
        }
    }

    return 1;
}
Hello, its really hard man, There is a easy ways? Look im looking for a tutoiral how it im not find can some one give me a Chance Rob? [Failed , Succesfully ]
Reply


Messages In This Thread
How to add Chance ? - by Thanks - 16.01.2017, 19:54
Re: How to add Chance ? - by azzerking - 16.01.2017, 20:02
Re: How to add Chance ? - by Thanks - 16.01.2017, 20:04
Re: How to add Chance ? - by azzerking - 16.01.2017, 20:09
Re: How to add Chance ? - by Thanks - 16.01.2017, 20:15
Re: How to add Chance ? - by azzerking - 16.01.2017, 20:23
Re: How to add Chance ? - by Thanks - 17.01.2017, 16:26
Re: How to add Chance ? - by azzerking - 17.01.2017, 16:51
Re: How to add Chance ? - by Thanks - 17.01.2017, 17:32

Forum Jump:


Users browsing this thread: 1 Guest(s)