Setting random amount (Min-Max)
#1

As you might see im using random number and max is 250. How may i set it to be random from 100-250 ?

PHP код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(
g_var[playerid] == && IsPlayerInRangeOfPoint(playerid5,  2789.6619, -2517.810516.1509))
    {
            
DisablePlayerCheckpoint(playerid);
            new 
vehicleid GetPlayerVehicleID(playerid);
            new 
string[128], amount;
            
amount random (250);
            
format(stringsizeof(string), "*You've earned {FF6347}$%d{33CCFF} from dropping a car!"amount);
            
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
            
GiveDodMoney(playeridamount);
            
SetVehicleToRespawn(vehicleid);
            
g_var[playerid] = 1;
            
SetTimerEx("CountDown",1200*1000false"d"playerid);
        } 
Reply


Messages In This Thread
Setting random amount (Min-Max) - by weedxd - 02.10.2014, 10:36
Re : Setting random amount (Min-Max) - by AmirRFCNR - 02.10.2014, 10:47
Re: Setting random amount (Min-Max) - by weedxd - 02.10.2014, 10:58
Re: Re : Setting random amount (Min-Max) - by Vince - 02.10.2014, 11:06
Re: Setting random amount (Min-Max) - by PMH - 02.10.2014, 11:08
Re: Re : Setting random amount (Min-Max) - by weedxd - 02.10.2014, 11:09
Re: Setting random amount (Min-Max) - by weedxd - 02.10.2014, 11:11
Re : Re: Setting random amount (Min-Max) - by AmirRFCNR - 02.10.2014, 11:27
Re: Setting random amount (Min-Max) - by Vince - 02.10.2014, 11:30
Re: Setting random amount (Min-Max) - by weedxd - 02.10.2014, 11:32

Forum Jump:


Users browsing this thread: 1 Guest(s)