Ex:GetOffLineDays(playerID)
Useful Method.$offline = GetOffLineDays(-1) if $offline > 4 dosomething here endif
Larger example:
return7dayitem() = Make a Method adding items using AddPlayerInfo method.function offlineDaysScript() { $offline = GetOffLineDays(-1) $level = GetPlayerInfo( -1, "level" ) $salaryparam = $level * 50 $salary = $salaryparam * $offline $expparam1 = $level * $level $expparam2 = $expparam1 * 1000 $exp = $expparam2 * $offline if $offline > 0 if $offline <= 7 AddPlayerInfo( -1, "givepoint", $salary ) BC("chat", "player", -1, "[color=ffff3817]You were offline for: ", $offline, " days and have received ", $salary, " Salary!") endif endif if $offline > 7 AddPlayerInfo( -1, "givepoint", $salary ) AddPlayerInfo( -1, "exp", $exp ) BC("chat", "player", -1, "[color=ffff3817]You were offline for: ", $offline, " days and have received EXP, Items & Salary!") call return7dayitem() endif }
Example of Stats:
Player Level: 50
Salary Amount 1-7 days: 2500->17500
Salary Amount > 7 Days: 20000->xxxxxxx
EXP Amount > 7 Days: 20000000->xxxxxxxxxx
Works well within the OnLogin() method.
LeRaz0r
Ragezone