15.09.2018, 19:54
I need help about Golden Vehicle. Golden Vehicle is kinda bonus vehicle and shows every game day (24 real life minutes = 1 game day (24 in game hours) in 9pm till someone sales it for a big ammount of cash.
I've made already vehicle selling system but i need your help for choosing random vehicle for random price
I've made already vehicle selling system but i need your help for choosing random vehicle for random price
PHP код:
if (CarInfo[vehicleid][cValue] == 0)
{
CarInfo[vehicleid][cValue] += random(10000) + random(10000) + random(10000) + random(10000);
}
GameTextForPlayer(playerid,"~w~You Can Sell This~n~Vehicle At The Crane",5000,3);
format(string, sizeof(string), "You Can Sell This Vehicle For $%d At Any Car Crane.", CarInfo[vehicleid][cValue]);
SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, string);
SetPlayerMapIcon(playerid,97,977.395141, 2096.568359, 10.820312,55,0, MAPICON_GLOBAL);//Vegas
SetPlayerMapIcon(playerid,98,-1569.863647, 97.912040, 3.554687,55,0, MAPICON_GLOBAL);//SF
SetPlayerMapIcon(playerid,99,2790.516113, -2529.446777, 13.630439,55,0, MAPICON_GLOBAL);//LS
PHP код:
//Hours, Minutes, Seconds, Milliseconds
#define GoldenVehicleDelay(%1,%2,%3,%4) (%1*3600000)+(%2*60000)+(%3*1000)+%4
//20 = 200,000 minimum 30 = 200,000 -> 500,000
#define GoldenVehicle ((random(30)+20)*10000)
//10 mins!
#define GV_DELAY GoldenVehicleDelay(0, 500, 0, 0)