SA-MP Forums Archive
Help With getting random cash - 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)
+--- Thread: Help With getting random cash (/showthread.php?tid=513484)



Help With getting random cash - AroseKhanNiazi - 16.05.2014

how can i get random cash from all player even an random amount for each player
and sendclientmessage to player for the amount he said ( i want to know how to get to know how much he gave) subtract that amount from him and after that amount we got from all other players give it to one player


Re: Help With getting random cash - AroseKhanNiazi - 17.05.2014

BuMp Please help


Re: Help With getting random cash - rumen98 - 17.05.2014

I'm confused
This should be something like taxes for each person??


Re: Help With getting random cash - AroseKhanNiazi - 17.05.2014

no for an birthday system


Re: Help With getting random cash - rumen98 - 17.05.2014

i dont know maybe
PHP код:
forward BirthDayPresent(playerid);
public 
BirthDayPresent(playerid)
{
         new 
birth[128]; //string for message
         
new money random(50001); // this will give each player random money from 0 to 50000
         
format (birthsizeof(birth), "Happy Birthday you get %d money",money); //format message
         
GivePlayerMoney(playerid,money);
         
SendClientMessage(playerid,0xADD8E6FF,birth);
    return 
1;
}
COMMAND:givepresents(playerid,params[])
{
    for(new 
0MAX_PLAYERSa++)
    {
    
BirthDayPresent(a);
    }
return 
1;

but I'm pretty sure it would not work so
but try it with someone and give me the result

EDIT:
also added on top of this command if you want to just about RCON admin
PHP код:
     if(!IsPlayerAdmin(playerid)) return 0



Re: Help With getting random cash - AroseKhanNiazi - 17.05.2014

it's not a command i got the system ready i know how to get random amount from player but i want to get from every player an different amount and give t to 1 player


Re: Help With getting random cash - rumen98 - 17.05.2014

For example, money from all players to birthday


Re: Help With getting random cash - AroseKhanNiazi - 17.05.2014

get money from all players and give it to one player


Re: Help With getting random cash - Beckett - 17.05.2014

So you mean like this?

You have got *AMOUNT OF RANDOM* from PLAYER_NAME?


* I couldn't completely understand what you said, sorry.


Re: Help With getting random cash - rumen98 - 17.05.2014

And by chance how to declare this birthday?


DaniceMcHarley, He wants to say that he wants to take money from all players as a gift to jubilarian and to give them

For instance:
50 people, one birthday
to take money from those 49 people and giving them jubilarian

This is at least as understood by all