02.10.2014, 10:36
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] == 0 && IsPlayerInRangeOfPoint(playerid, 5, 2789.6619, -2517.8105, 16.1509))
{
DisablePlayerCheckpoint(playerid);
new vehicleid = GetPlayerVehicleID(playerid);
new string[128], amount;
amount = random (250);
format(string, sizeof(string), "*You've earned {FF6347}$%d{33CCFF} from dropping a car!", amount);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
GiveDodMoney(playerid, amount);
SetVehicleToRespawn(vehicleid);
g_var[playerid] = 1;
SetTimerEx("CountDown",1200*1000, false, "d", playerid);
}