1 hour = 100000

Started by FinchDon, Aug 17, 2015, 02:52 PM

Previous topic - Next topic

FinchDon

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?
For any help and support Join #s-s at IRC for Help in Scripting
( For Newbies )

KAKAN

Its easy, Now I'm in phone, I'll post an example when I'll be in laptop
oh no

FinchDon

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

MatheuS

#3
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
if( !sucess ) tryAgain();
Thanks to the VCMP community. It was the happiest period of my life.

Thijn

You would want to check if the player is actually the same as the one who joined an hour ago.

FinchDon

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

FarisDon

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 ???

Spice

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.....