Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: rww on Aug 14, 2015, 10:12 AM

Title: How every 100 you receive extra award...
Post by: rww on Aug 14, 2015, 10:12 AM
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.
Title: Re: How every 100 you receive extra award...
Post by: FinchDon on Aug 14, 2015, 10:26 AM
Is This?
function onPlayerJoin( player )
{
NewTimer( "reward", 10000, 1,player );
}
function reward( player )
{
player.Cash += 600;
}
Title: Re: How every 100 you receive extra award...
Post by: DizzasTeR on Aug 14, 2015, 10:28 AM
if( test % 100 == 0 ) // your code here this will do it for every 100 ammount.
@FinchDon lol.
Title: Re: How every 100 you receive extra award...
Post by: FinchDon on Aug 14, 2015, 10:31 AM
what bro any problem in my code ?
Title: Re: How every 100 you receive extra award...
Post by: rww on Aug 14, 2015, 10:32 AM
@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...
Title: Re: How every 100 you receive extra award...
Post by: Thijn on Aug 14, 2015, 04:20 PM
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.
Title: Re: How every 100 you receive extra award...
Post by: EK.IceFlake on Aug 17, 2015, 12:52 PM
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.