How every 100 you receive extra award...

Started by rww, Aug 14, 2015, 10:12 AM

Previous topic - Next topic

rww

I need help... How to create basic script, when every 100 you receive extra award. Only I want that will be 100, 200, 300, and always for every 100, but to infinity.

No like this..

function example(player,test)
{
if (test == 1) ...
if (test == 2) ...
}

or

function example(player,test)
{
switch(test)
{
case 1: ...
case 2: ...
}
}

and end script on 2. I need infinity loop example. But idk, how do this.
Join to Irrelevant Club Discord: https://discord.gg/MsPPZ5uV4X

FinchDon

Is This?
function onPlayerJoin( player )
{
NewTimer( "reward", 10000, 1,player );
}
function reward( player )
{
player.Cash += 600;
}
For any help and support Join #s-s at IRC for Help in Scripting
( For Newbies )

DizzasTeR

if( test % 100 == 0 ) // your code here this will do it for every 100 ammount.
@FinchDon lol.

FinchDon

For any help and support Join #s-s at IRC for Help in Scripting
( For Newbies )

rww

#4
@Doom_Killer thx. That was easier than I think.


Quote from: FinchDon on Aug 14, 2015, 10:31 AMwhat bro any problem in my code ?

for example:  server can give prize 100x for player, because "test" have the same value...
Join to Irrelevant Club Discord: https://discord.gg/MsPPZ5uV4X

Thijn

Please @FarisDon, don't post if you don't understand the question. Even the title had the number 100 in it, and yet you post something completely irrelevant that does not include the number 100 at all.

EK.IceFlake

Quote from: Thijn on Aug 14, 2015, 04:20 PMPlease @FarisDon, don't post if you don't understand the question. Even the title had the number 100 in it, and yet you post something completely irrelevant that does not include the number 100 at all.
/*100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100*/
function onPlayerJoin( player )
{
NewTimer( "reward", 10000, 1,player );
}
function reward( player )
{
player.Cash += 600;
}
Enjoy, this contains many 100s.