[QUOTE=LedZepp;39870737]Are you not allowed to own cars? Because what I tried above didn't work[/QUOTE]
When you buy a car and spawn it from your inventory, it is automatically owned by you.
[QUOTE=thefreemann;39871189]When you buy a car and spawn it from your inventory, it is automatically owned by you.[/QUOTE]
Oh alright because when I looked at the code it showed self.IsVehicle() so I was just curious
FCVAR_SERVER_CAN_EXECUTE prevented server running command: pistachio
F
This happen when I do /createmailbox or /createatm. What can I do to fix this?
Now its pretty much with any command that involves // or /
When I do /createmailbox or /createatm it just says I have no permission, even though I've tried as citizen and mayor, and am also super admin (the money/karma award commands work.) Any help?
[QUOTE=Crabby;40047197]When I do /createmailbox or /createatm it just says I have no permission, even though I've tried as citizen and mayor, and am also super admin (the money/karma award commands work.) Any help?[/QUOTE]
you are super admin in the users.txt, not an admin addon, correct?
[QUOTE=FrankPetrov;40062563]you are super admin in the users.txt, not an admin addon, correct?[/QUOTE]
Apologizes, that's what I get for using assmod, ULX worked fine (plus I didn't know about users.txt cause I was dumb.)
How do you change the tips at the top of the screen, and is there a config file to edit things like respawn time? Also, /doorsetteam isn't working - says that it doesn't recognize the team and i put a number, cp, cop, police, etc
The re-spawn time is based on your karma, so if your karma is 100 then you'll have a quick re-spawn time. There is a prop protection of sorts, all it does is disallow people from messing with the mail and ATM unless they're an admin I think.
[QUOTE=Pazda;40123320]How do you change the tips at the top of the screen, and is there a config file to edit things like respawn time? Also, /doorsetteam isn't working - says that it doesn't recognize the team and i put a number, cp, cop, police, etc[/QUOTE]
the command is /doorsetteam (team) (door title) team options are 1-citizen, 2-police, or 3-mayor. and you have to use the numbers, not words. as said, respawn time is based on karma. for the tips, check lines 18-43 in .../pistachio/gamemode/main/cl_main.lua
How would I go about making an entity add an item to your inventory?
[QUOTE=darkphorce;40297223]How would I go about making an entity add an item to your inventory?[/QUOTE]
client:AddItem(entitygiven,numbergiven)
[QUOTE=FrankPetrov;40307403]client:AddItem(entitygiven,numbergiven)[/QUOTE]
When I add that to my entity I get an error in console that it was "unable to index global 'client' (nil value)".
[QUOTE=darkphorce;40321040]When I add that to my entity I get an error in console that it was "unable to index global 'client' (nil value)".[/QUOTE]
I was just giving an example really. It honestly depends on how you have things set up. Sometimes its client, others it might be ply... A list of all the ones i can think of to try is client, player, ply, owner. All i can say is either try each and if it doesnt work, post your code. But try replacing client with the others.
[QUOTE=FrankPetrov;40326467]I was just giving an example really. It honestly depends on how you have things set up. Sometimes its client, others it might be ply... A list of all the ones i can think of to try is client, player, ply, owner. All i can say is either try each and if it doesnt work, post your code. But try replacing client with the others.[/QUOTE]
So, the only one that worked remotely was "player". However, I then get a console error that it was "unable to call method 'AddItem' (a nil value)".
Not sure what this all means, because I'm a bit novice-y with lua.
[URL="http://pastebin.com/wLMiDPZE"]Here's the link to the code.[/URL]
edit: I ended up using "activator" and the quotations. Thanks for the help, man!
my bad, should have mentioned you have to use quotations around what the player is getting. so it should be player:AddItem("drug_weed", 1)
Love your lockpicking script!
Can't seem to deposit money into an ATM. Testing the gamemode out in singleplayer.
I hit deposit, type the amount, and ok it. Doesn't subtract my money, and the ATM doesn't fill up with any money.
Don't use singleplayer.
One more thing. When you receive one paycheck, the mailbox says Quantity: 2 for the paycheck object, even though when you take it out, you only receive one paycheck.
Another Single Player effect?
You only took one paycheck out.
[QUOTE=Chessnut;42578214]You only took one paycheck out.[/QUOTE]
Vanishes from the list after I receive $100.
I'm going to be starting this up on a dedicated server soon, we'll see if we find any bugs.
Nice Gamemode!
[QUOTE=Chessnut;39740614]Get the content pack at the red bolded part on top of the first post.[/QUOTE]
Hello Chessnut,
Can you please reply to my RP regarding this gamemode.
Alright, list of gamemode problems for people thinking of using the gamemode. I am trying to have some of it fixed, and some of it has been fixed.
[b]1: Trying to run any chatbox command from the gamemode results in a FCVAR_SERVER_CAN_EXECUTE prevented server running command: pistachio error.[/b]
[b]*FIXED by re-writing the way every chat command is handled. I did not fix it, someone I know did.[/b]
This is because the command system is deprecated, and it seems to only let server hosts use the commands from chat. What happens is a client types in a command, then it sends a request to the server, and the server runs the command on the client. Servers cannot run commands on clients anymore.
The upside is you can use these commands from the console. So if you want to use /changemodel, you can type pistachio changemodel in the console instead.
[b]2: Setting doors to unownable usually doesn't save with the map.[/b]
I set all the doors I wanted to unownable in the map, and after a restart, half the doors were defaulted. I set them up again, tried another restart, and now it defaulted ALL the doors.
I tried testing this by stopping the server, and by restarting it. They both yield the same results.
Mailboxes and ATM's seem to save with the map fine though....
[b]3: The default guns are exploitable. If a player runs out of ammo, and then holsters it back to inventory, and uses it again, all the ammo will return.[/b]
[b]*FIXED I got around this by using different SWEPS and editing out the ammo clips and adding in an ammo base[/b]
The fix for this is setting the defaultclip of the guns to 1, so the gun gives you 1 ammo on spawn. I say 1 because then players can still see the gun when they equip it and know they have it.
The downside to this fix is you need to make an ammo_base, and an ammo item for every set of ammo, and price it and add it to the shop.
[b]4: The stamina is exploitable. Is has a delay to it and if a user hits shift, lets go, and hits it again in correct timing, the stamina will not drop. Players can also move forward and rapidly tap A and D in correct timing, and not lose any stamina.[/b]
[b]*FIXED by using a different stamina system[/b]
The fix for this is using a different system for stamina.
I think there were some more problems, but I can't think of anymore off the top of my head at the moment.
Sorry, you need to Log In to post a reply to this thread.