SA-MP Forums Archive
Random giving 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)
+--- Thread: Random giving money ? (/showthread.php?tid=387071)



Random giving money ? - BlueGames - 23.10.2012

It is possible to make cmd are giving random money ?
I using strcmp, Im not asking for you guys to make a cmd just explain to me how make a random giving cash.


Re: Random giving money ? - newbienoob - 23.10.2012

Use Random
Example:
Код:
new money = random(1000); //Random money you will get between 0 - 1000
GivePlayerMoney(playerid,money);



Re: Random giving money ? - Abhishek. - 23.10.2012

well as if i think keep al the players in an array and use the rand function in array to give randomly someone cash


Re: Random giving money ? - BlueGames - 23.10.2012

Quote:
Originally Posted by newbienoob
Посмотреть сообщение
Use Random
Example:
Код:
new money = random(1000); //Random money you will get between 0 - 1000
GivePlayerMoney(playerid,money);
Thanks but,
What i need write into here i know that possible make random stuffs but how to place money into this one ?
pawn Код:
new Float:RandomSpawn[][4] =
{
    // Positions, (X, Y, Z and Facing Angle)
    {-2796.9854, 1224.8180, 20.5429, 192.0335},
    {-2454.2170, 503.8759, 30.0790, 267.2932},
    {-2669.7322, -6.0874, 6.1328, 89.8853}
};

Quote:
Originally Posted by [bot]fatninja
Посмотреть сообщение
well as if i think keep al the players in an array and use the rand function in array to give randomly someone cash
Didnt get your point.
What i gona make not going be just a cmd to give random cash to player..


Re: Random giving money ? - newbienoob - 23.10.2012

That's a random spawns. Check this thread
https://sampforum.blast.hk/showthread.php?tid=162488


Re: Random giving money ? - BlueGames - 23.10.2012

Quote:
Originally Posted by newbienoob
Посмотреть сообщение
That's a random spawns. Check this thread
https://sampforum.blast.hk/showthread.php?tid=162488
I dont need random spawn, i need random giving money you cannot read ?


Re: Random giving money ? - Abhishek. - 23.10.2012

well i thought you need to give money to some random guy insted of giveing someone random money
and he has alredy wrote about your need


Re: Random giving money ? - BlueGames - 23.10.2012

Quote:
Originally Posted by [bot]fatninja
Посмотреть сообщение
well i thought you need to give money to some random guy insted of giveing someone random money
/givecash ?


Re: Random giving money ? - BlueGames - 23.10.2012

Any idea ? How to make random giving cash?


Re: Random giving money ? - Abhishek. - 23.10.2012

well would you mind what you want to do exactly so i can just give you your codes