• In game timer
    9 replies, posted
Hi all, I see this in some server : [url]http://www.noelshack.com/2014-22-1401648260-sans-titre.png[/url] It show the time you play on a server, and it can be very good for job. For exemple : if i stand 3H on the server i can be a gundealer. Thank you all.
Yes, it's a very nice timer.
It's called UTime. You can find it here: [url]https://github.com/Nayruden/Ulysses[/url] Apparently [i]some people[/i] aren't willing to help.
I think what he means is, if you've been on the server for 3 hours you can become a gun dealer. You'd need a [URL="http://wiki.darkrp.com/index.php/DarkRP:CustomJobFields#Field_explanations"]CustomCheck[/URL] for the job: [code]function(ply) return ply:GetUTime() > 10800 end[/code]
Thank you all
I try your function me and it dont work , the consol say me : [ERROR] addons/darkrpmodification-master/lua/darkrp_customthings/jobs.lua:121: function arguments expected near '>' 1. unknown - addons/darkrpmodification-master/lua/darkrp_customthings/jobs.lua:0
[code]function(ply) return ply:GetUTime() > 10800 end[/code] I assume. He forgot parentheses
[QUOTE=Tomvdr;44979664][code]function(ply) return ply:GetUTime() > 10800 end[/code] I assume. He forgot parentheses[/QUOTE] Thanks, I didn't check my code before posting it.
Now i have a trouble with CustoCheck.. i place the code and the consol say to me [ERROR] addons/darkrpmodification-master/lua/darkrp_customthings/jobs.lua:122: '}' expected (to close '{' at line 108) near 'CustomCheckFailMsg' 1. unknown - addons/darkrpmodification-master/lua/darkrp_customthings/jobs.lua:0 i try to fix it but i dont... this is my code (it is in french) : [CODE]TEAM_REB = DarkRP.createJob("Rebelle médecin", { color = Color(75, 75, 75, 255), model = {"models/player/group03m/male_05.mdl", "models/player/group03m/female_02.mdl"}, description = [[Vous formez la Rebellion de Cité17, organisez vous, et menez des assaults contre la MPF (sans oubliez les règles bien sur) et n'oubliez vous devez Aider les citoyens.]], weapons = {"weapon_medkit"}, command = "gangster_medecin", max = 1, salary = 0, admin = 0, vote = false, hasLicense = false, customCheck = function(ply) return ply:GetUTime() > 10800 end CustomCheckFailMsg = "Il faut 3 heures de jeu !", PlayerDeath = function(ply) ply:changeTeam( TEAM_CITIZEN, true) end })[/CODE]
[QUOTE=annilator3000;44979812]Now i have a trouble with CustoCheck.. i place the code and the consol say to me [ERROR] addons/darkrpmodification-master/lua/darkrp_customthings/jobs.lua:122: '}' expected (to close '{' at line 108) near 'CustomCheckFailMsg' 1. unknown - addons/darkrpmodification-master/lua/darkrp_customthings/jobs.lua:0 i try to fix it but i dont... this is my code (it is in french) : [CODE]TEAM_REB = DarkRP.createJob("Rebelle médecin", { color = Color(75, 75, 75, 255), model = {"models/player/group03m/male_05.mdl", "models/player/group03m/female_02.mdl"}, description = [[Vous formez la Rebellion de Cité17, organisez vous, et menez des assaults contre la MPF (sans oubliez les règles bien sur) et n'oubliez vous devez Aider les citoyens.]], weapons = {"weapon_medkit"}, command = "gangster_medecin", max = 1, salary = 0, admin = 0, vote = false, hasLicense = false, customCheck = function(ply) return ply:GetUTime() > 10800 end CustomCheckFailMsg = "Il faut 3 heures de jeu !", PlayerDeath = function(ply) ply:changeTeam( TEAM_CITIZEN, true) end })[/CODE][/QUOTE] This should work. [CODE]TEAM_REB = DarkRP.createJob("Rebelle médecin", { color = Color(75, 75, 75, 255), model = {"models/player/group03m/male_05.mdl", "models/player/group03m/female_02.mdl"}, description = [[Vous formez la Rebellion de Cité17, organisez vous, et menez des assaults contre la MPF (sans oubliez les règles bien sur) et n'oubliez vous devez Aider les citoyens.]], weapons = {"weapon_medkit"}, command = "gangster_medecin", max = 1, salary = 0, admin = 0, vote = false, hasLicense = false, customCheck = function(ply) return ply:GetUTime() > 10800 end, CustomCheckFailMsg = "Il faut 3 heures de jeu !", PlayerDeath = function(ply) ply:changeTeam(TEAM_CITIZEN, true) end, })[/CODE]
Sorry, you need to Log In to post a reply to this thread.