css throving knives
Hi guys. I have a jailbreak server (sm_hosties). I have an idea to edit this plugin http://forums.alliedmods.net/showthread.php?t=125226 that ONLY terrorists that has admin/vip flag can use it. Can some one help me?
|
Re: css throving knives
1 Attachment(s)
Change this:
PHP Code:
PHP Code:
Attached the modified version for you. |
Re: css throving knives
g_iKnives[client] isn't reset on disconnect, so with that modification it would be possible for a future client to inherit the knives of the previous player. Just need an else clause to reset the knives go 0 or throw it in OnClientDisconnect.
|
Re: css throving knives
ya, I saw that possiblity, but didn't look through for the disconnect code to see if it got reset... just used the online compiler to make sure it would compile before I posted.
Here's the code suggested by thetwistedpanda so a new player doesn't glitch the plugin and get knives when they're not allowed to: PHP Code:
|
Re: css throving knives
I don't know why, but it doesn't work... I haven't changed your code, i putted the file u attached in your post. Bu I can't throw any knifes... (i am an admin)
EDIT: Oh... sory, i added it to wrong folder. It works great, thanks! :) One question, how to change knivies demage to 115? I have this cavar sm_throwingknives_damage "57" but when i put it in console it doesn't work... |
All times are GMT -4. The time now is 07:02. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.