Random
#3

This is for a player to pick up

OnPlayerPickUpPickup.
Код:
if(pickupid == your_pickup)
  {
    new str[44];
    new randmoney = random(100001) - 50000;
    format(str, sizeof(str), " >> Player picked up %s and recieved $%d", your_pickup, randmoney);
    SendClientMessage(playerid, 0xffffffff, str);
    GivePlayerMoney(playerid, randmoney);
  }
Or if you want to give people cash

OnPlayerSpawn
Код:
GivePlayerMoney(playerid,random(100000-50000)+50000);
Reply


Messages In This Thread
Random - by Ananisiki - 27.03.2014, 23:43
Re: Random - by Jefff - 27.03.2014, 23:59
Re: Random - by SkilledMaster - 28.03.2014, 13:43
Re: Random - by arakuta - 28.03.2014, 14:27
Re: Random - by newbie scripter - 28.03.2014, 14:52
Re: Random - by Ananisiki - 29.03.2014, 00:52
Re: Random - by Vince - 29.03.2014, 00:57
Re: Random - by Ananisiki - 29.03.2014, 01:11
Re: Random - by Konstantinos - 29.03.2014, 12:08

Forum Jump:


Users browsing this thread: 1 Guest(s)