Raised This Month: $ Target: $400
 0% 

FCVAR_SERVER_CAN_EXECUTE question.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hectorz0r
Senior Member
Join Date: Oct 2008
Old 08-18-2010 , 14:17   FCVAR_SERVER_CAN_EXECUTE question.
Reply With Quote #1

Is there any way to get rid of it? Or it's simply blocked and cannot be unlocked?

Ex:
PHP Code:
ClientCommand(player"use weapon_crowbar"
Use seems to be a clientside command, since FakeClientCommand does nothing. I know I could change it through ActiveWeapon but it gives me some wierd results such as change the weapon but the weaponmodel doesnt show, I mean, the 3rd person weaponmodel. Suggestions?
__________________

hectorz0r is offline
Master53
Veteran Member
Join Date: Dec 2009
Old 08-18-2010 , 15:20   Re: FCVAR_SERVER_CAN_EXECUTE question.
Reply With Quote #2

you can force the command cheat command and have sv_cheats send to the client and have it removed when the script is over. so you dont need fakeclientcommand nor clientcommand
__________________
Master(d)



Master53 is offline
hectorz0r
Senior Member
Join Date: Oct 2008
Old 08-18-2010 , 15:42   Re: FCVAR_SERVER_CAN_EXECUTE question.
Reply With Quote #3

Quote:
Originally Posted by Master53 View Post
you can force the command cheat command and have sv_cheats send to the client and have it removed when the script is over. so you dont need fakeclientcommand nor clientcommand


Use isnt a cheat command.
__________________


Last edited by hectorz0r; 08-18-2010 at 15:42. Reason: fixed a typo
hectorz0r is offline
Master53
Veteran Member
Join Date: Dec 2009
Old 08-18-2010 , 15:52   Re: FCVAR_SERVER_CAN_EXECUTE question.
Reply With Quote #4

but does it require sv_cheats 1 to be called and actually give a crowbar to the client?
__________________
Master(d)



Master53 is offline
Monkeys
Veteran Member
Join Date: Jan 2010
Old 08-18-2010 , 16:49   Re: FCVAR_SERVER_CAN_EXECUTE question.
Reply With Quote #5

"use" doesn't give the client a weapon. It equips it.
That being said
EquipPlayerWeapon
__________________
Get a lid on that zombie,
he's never gonna be alri-i-ight.
Oooh get a lid on that zombie,
or he's gonna feed all night.
Monkeys is offline
rcarm
Member
Join Date: Feb 2010
Old 08-18-2010 , 20:00   Re: FCVAR_SERVER_CAN_EXECUTE question.
Reply With Quote #6

You can use SDK Hooks to prevent players from using it or picking it up.

http://forums.alliedmods.net/showthread.php?t=106748
rcarm is offline
hectorz0r
Senior Member
Join Date: Oct 2008
Old 08-19-2010 , 08:43   Re: FCVAR_SERVER_CAN_EXECUTE question.
Reply With Quote #7

Quote:
Originally Posted by Monkeys View Post
"use" doesn't give the client a weapon. It equips it.
That being said
EquipPlayerWeapon
Won't work. Assuming that on hl2mp you can carry more than one weapon per slot, the GetPlayerWeaponSlot should return the physgun instead of the crowbar if player dont own a crowbar. Is there any way to get the CBaseCombatWeapon entity index without using the GetPlayerWeaponSlot native?
__________________

hectorz0r is offline
dYZER
Member
Join Date: Jan 2010
Location: Germany
Old 08-19-2010 , 12:32   Re: FCVAR_SERVER_CAN_EXECUTE question.
Reply With Quote #8

take a look at puppet mod
dYZER is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:00.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode