Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: FinchDon on Aug 17, 2015, 02:52 PM

Title: 1 hour = 100000
Post by: FinchDon on Aug 17, 2015, 02:52 PM
Guyz i m updating my script so thoughout one update but don't know how to make it work able that when playerjoin then player playing 1 hour in server he get 100000 where i add timer for player?
Title: Re: 1 hour = 100000
Post by: KAKAN on Aug 17, 2015, 02:53 PM
Its easy, Now I'm in phone, I'll post an example when I'll be in laptop
Title: Re: 1 hour = 100000
Post by: FinchDon on Aug 17, 2015, 02:57 PM
okay!
Title: Re: 1 hour = 100000
Post by: MatheuS on Aug 17, 2015, 03:43 PM
function onPlayerJoin( player )
{
try {
NewTimer( "Reward", 60000, 30, player.Name ); //1 minute, 1000 = 1 seg
}
catch(e) { print( "onPlayerJoin Error: " + e ); }
}

function Reward( user )
{
local player = FindPlayer( user );
if ( player )
{
player.Cash =+ 1000;
                MessagePlayer("Happy!", player );
}
}

UPDATED
Title: Re: 1 hour = 100000
Post by: Thijn on Aug 17, 2015, 04:12 PM
You would want to check if the player is actually the same as the one who joined an hour ago.
Title: Re: 1 hour = 100000
Post by: FinchDon on Aug 17, 2015, 04:17 PM
Works Thanks
Title: Re: 1 hour = 100000
Post by: FarisDon on Aug 17, 2015, 04:34 PM
Quote from: Thijn on Aug 17, 2015, 04:12 PMYou would want to check if the player is actually the same as the one who joined an hour ago.
Well yeah surely he want's to maybe the name is the same, but id different maybe both are same but the player is still changed than how ???
Title: Re: 1 hour = 100000
Post by: Spice on Aug 17, 2015, 04:55 PM
it will only count all players in server after an hour and increase thier cash to 100000 but if a player came in server just before ending the timer he will also get cash but i think u should change it to in this way when a player come his timer start and when he gone his timer pause and when he come again his timer starts from where it last time paused........so that every player will have its own time.......to get money.....