Hi there,
I'm trying to restrict money printers from my cop jobs and my current code doesn't seem to work:
[CODE]
AddEntity("Money Printer", "money_printer", "models/props_c17/consolebox01a.mdl", 2000, 4, "/buyprinter", nil, function(ply) return !ply:isCP end)
[/CODE]
How do I restrict it from CPs only?
Thanks,
Computer600
[QUOTE=Computer600;43437078]Hi there,
I'm trying to restrict money printers from my cop jobs and my current code doesn't seem to work:
[CODE]
AddEntity("Money Printer", "money_printer", "models/props_c17/consolebox01a.mdl", 2000, 4, "/buyprinter", nil, function(ply) return !ply:isCP end)
[/CODE]
How do I restrict it from CPs only?
Thanks,
Computer600[/QUOTE]
Untested but should work. Not secure if TEAM_CIVILPROTECTION is correctly cause i am not using DarkRP normally
[CODE]
AddEntity("Money Printer", "money_printer", "models/props_c17/consolebox01a.mdl", 2000, 4, "/buyprinter", nil, function(ply) return if ply:Team() == TEAM_CIVILPROTECTION then return end)
[/CODE]
That looks right except you forgot the function arguments:
!ply:isCP[B]()[/B]
[QUOTE=OzymandiasJ;43437121]That looks right except you forgot the function arguments:
!ply:isCP[B]()[/B][/QUOTE]
Damn it! Need to remember to do that with functions :P Thanks :D
Sorry, you need to Log In to post a reply to this thread.