Random money
#1

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
Reply
#2

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);
}
Reply
#3

edit: nvm, ^ was earlier
Reply
#4

ok i think i fixed the random part
Quote:

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

but how do i make when it sayed received 50000?
Reply
#5

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)