#9

Quote:
Originally Posted by iLearner
Посмотреть сообщение
Try assigning the value to a integer and put that into random().

New myVal = b...
New Random = Random(myVal);
That worked though. Here is the full code
PHP код:
forward Robbiz(playerid);
public 
Robbiz(playerid)
{
    new 
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(playeridpInfo[playerid][cScore] + pInfo[playerid][rScore]);
    
SCM(playerid, -1"[INFO]: Biz robbed successfully. 5 criminal scores awarded!");
    return 
1;

InsideBiz is holding the biz's id
Reply


Messages In This Thread
rand - by StrikerZ - 14.12.2016, 07:34
Re: rand - by AroseKhanNiazi - 14.12.2016, 07:58
Re: rand - by StrikerZ - 14.12.2016, 08:00
Re: rand - by iLearner - 14.12.2016, 08:11
Re: rand - by StrikerZ - 14.12.2016, 08:15
Re: rand - by iLearner - 14.12.2016, 08:20
Re: rand - by StrikerZ - 14.12.2016, 08:29
Re: rand - by iLearner - 14.12.2016, 08:31
Re: rand - by StrikerZ - 14.12.2016, 08:34
Re: rand - by iLearner - 14.12.2016, 09:51

Forum Jump:


Users browsing this thread: 4 Guest(s)