14.12.2016, 08:34
Quote:
Try assigning the value to a integer and put that into random().
New myVal = b... New Random = Random(myVal); |
PHP код:
forward Robbiz(playerid);
public Robbiz(playerid)
{
new c = InsideBiz[playerid];
new Robbed = random(Business[c][bMoney])+1;
new string[120];
format(string,sizeof(string),"[ROBBERY]: %s has robbed $%d from %s's biz",PN(playerid),Robbed,Business[c][bOwner]);
SCMToAll(COLOR_GREEN,string);
GivePlayerMoney(playerid,Robbed);
Business[c][bMoney] = Business[c][bMoney]-Robbed;
pInfo[playerid][rScore] = pInfo[playerid][rScore]+5;
SetPlayerScore(playerid, pInfo[playerid][cScore] + pInfo[playerid][rScore]);
SCM(playerid, -1, "[INFO]: Biz robbed successfully. 5 criminal scores awarded!");
return 1;
}