No that didnt work.... it seems anyone can see the guns
but ... can you see the weapons ? and vips can see the weapons ? because this code is for vips and administration , so if your not Vip or admin , you CAN'T see the weapon
( sorry for my spelling , im from a spanish country )
i remember doing this a while back.
its tricky and depending on how you want it to work you will need to recode some of darkrp.
it was a request for someone and they wanted ULX tied in so that jobs and entities could be chosen for guests, VIPs, Admins, Super admins and owners (pretty much any rank) instead of the default all, admin, super admin.
add me on steam and ill help you out if you like
This is how I add my "VIP moneyprinters".
[lua]AddEntity("Elite Money Printer", "cbc_elite_money_printer", "models/props_lab/reciever01a.mdl", 4500, 1, "/buyelitemoneyprinter", nil, function(ply) return ply:GetUserGroup("usergroup") == "bronze_vip" or ply:GetUserGroup("usergroup") == "silver_vip" or ply:GetUserGroup("usergroup") == "gold_vip" or ply:GetUserGroup("usergroup") == "bronze_vipadmin" or ply:GetUserGroup("usergroup") == "silver_vipadmin" or ply:GetUserGroup("usergroup") == "gold_vipadmin" or ply:GetUserGroup("usergroup") == "trusted_admin" or ply:IsSuperAdmin() end)[/lua]
All you have to do it add a "nil," after each row if you don't have a job specified required to spawn.
If you do have jobs set up like TEAM_GUN, you would make it show up as this:
[lua]AddCustomShipment("<Name of the shipment(no spaces)>"," <the model that the shipment spawns(should be the world model...)>", "<the classname of the weapon>", <the price of one shipment>, <how many guns there are in one shipment>, <OPTIONAL: true/false sold seperately>, <OPTIONAL: price when sold seperately>, < true/false OPTIONAL: /buy only = true> , OPTIONAL which classes can buy the shipment, OPTIONAL: the model of the shipment)[/lua]
If you don't include the last one, the "the model of the shipment" part, you'll have to type
[lua], nil, function(ply) return ply:GetUserGroup("usergroup") == "<rank you want>" or ply:GetUserGroup("usergroup") == "<2nd rank you want>" end[/lua]
If you don't include the ", nil," you make DarkRP think that you need to get the usergroups to specify shipment models.
Thanks will give it a try... and Coventry... Im not stupid :L i removed my self as admin and re joined to see if there was any change.
[editline]31st August 2012[/editline]
And i dont understand thats what ive done and still no luck :/
[QUOTE=Mark Hoppus;37479408]Thanks will give it a try... and Coventry... Im not stupid :L i removed my self as admin and re joined to see if there was any change.
[editline]31st August 2012[/editline]
And i dont understand thats what ive done and still no luck :/[/QUOTE]
Listen, all you need to do with your existing script is add another " nil," behind the other "nil" at the end. Right now you're saying that the usergroup the person has is the model that has to be used for the Shipment, which won't work.
ahahahaah thank you :') im a retard at this... 2nd day coding :)
Thanks
[QUOTE=Mark Hoppus;37480776]ahahahaah thank you :') im a retard at this... 2nd day coding :)
Thanks[/QUOTE]
This is not something you call coding. It's called filling in variables.
Sorry, you need to Log In to post a reply to this thread.