SA-MP Forums Archive
Random money - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Random money (/showthread.php?tid=172078)



Random money - FireCat - 28.08.2010

how can i make this briefcase i made give random money and says to all how much he received(image+code down)


PHP код:
if(pickupid == brief2)
{
    
GivePlayerMoney(playerid500000);
    
GivePlayerWeapon(playerid29,20);
    
format(stringsizeof(string), "%s has found a briefcase",name);
    
SendClientMessageToAll(COLOR_REDstring);
    
SendClientMessageToAll(COLOR_RED"and received 50000$ + SMG");

_______________________
1-3$ fix warnings 1-5$fix errors
6-15$ make gamemodes(not roleplay) 3-10$ make filterscripts-scriptfiles
Dont ASK! me RolePlay questions
www.mefreeroam.tk



Re: Random money - bigcomfycouch - 28.08.2010

pawn Код:
if(pickupid == brief2)
{
    new amt = random(50000);
    GivePlayerMoney(playerid, amt);
    GivePlayerWeapon(playerid, 29, 20);
    format(string, sizeof(string), "%s has found a briefcase and received $%i + an SMG.", name, amt);
    SendClientMessageToAll(COLOR_RED, string);
}



Re: Random money - LifeStyle - 28.08.2010

edit: nvm, ^ was earlier


Re: Random money - FireCat - 28.08.2010

ok i think i fixed the random part
Quote:

GivePlayerMoney(playerid, random(30)+100000);

but how do i make when it sayed received 50000?


Re: Random money - LifeStyle - 28.08.2010

Quote:
Originally Posted by bigcomfycouch
Посмотреть сообщение
pawn Код:
if(pickupid == brief2)
{
    new amt = random(50000);
    GivePlayerMoney(playerid, amt);
    GivePlayerWeapon(playerid, 29, 20);
    format(string, sizeof(string), "%s has found a briefcase and received $%i + an SMG.", name, amt);
    SendClientMessageToAll(COLOR_RED, string);
}
Use this code