Raised This Month: $ Target: $400
 0% 

Cvar setting problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Melisko
Senior Member
Join Date: Feb 2010
Old 06-16-2011 , 11:06   Re: Cvar setting problem
Reply With Quote #1

Quote:
Originally Posted by Devil259 View Post
Try to use set_pcvar_num( ).

Code:
if( iPluginON ) { set_pcvar_num( g_pcvarAutoBhop , 1 ) }
Thanks , this help me alot , but is it possible to set the cvar only for 1 player??? , Im making a VIP plugin , so the vips can choose if they want bunny hop or not , normal players can have bhop too , but they cant disable it (thats my plan). When I used this , it changed the server cvar and it disabled bhop to all players on the server....
Melisko is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 06-16-2011 , 11:09   Re: Cvar setting problem
Reply With Quote #2

Quote:
amx_autobhop <nick|#userid> <0|1>
Give autojump ability to a player (when bhop_auto is 0)
from ConnorMcLeod's post (see Bunny Hop Abilities v0.5.2 plugin).

So, use server_cmd( ).
__________________
You can do anything you set your mind to, man.

Devil259 is offline
Melisko
Senior Member
Join Date: Feb 2010
Old 06-16-2011 , 11:13   Re: Cvar setting problem
Reply With Quote #3

Quote:
Originally Posted by Devil259 View Post
from ConnorMcLeod's post (see Bunny Hop Abilities v0.5.2 plugin).

So, use server_cmd( ).
I think I wrote my last post wrong... I mean , enable/disable cvar bhop_auto only for player , that choose it in vip menu..... Im not rly good at scripting.....

Is it possbile that each player can have enable different cvar???

Last edited by Melisko; 06-16-2011 at 11:15. Reason: etc....
Melisko is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 06-16-2011 , 11:20   Re: Cvar setting problem
Reply With Quote #4

Code:
if( iPluginON ) {      server_cmd( "amx_autobhop %d 1" , get_user_userid( id ) ) }

Try this.
__________________
You can do anything you set your mind to, man.

Devil259 is offline
Melisko
Senior Member
Join Date: Feb 2010
Old 06-16-2011 , 16:06   Re: Cvar setting problem
Reply With Quote #5

Quote:
Originally Posted by Devil259 View Post
Code:
if( iPluginON ) { server_cmd( "amx_autobhop %d 1" , get_user_userid( id ) ) }


Try this.
Sorry but I cant compile it.... I have got errors . Like I said , Im not really good at scripting...
Melisko is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 06-16-2011 , 16:59   Re: Cvar setting problem
Reply With Quote #6

Show whole code.
__________________
You can do anything you set your mind to, man.

Devil259 is offline
Melisko
Senior Member
Join Date: Feb 2010
Old 06-16-2011 , 17:13   Re: Cvar setting problem
Reply With Quote #7

Quote:
Originally Posted by Devil259 View Post
Show whole code.
Ok , the svmplugintest.sma is a "tutorial" how to make that vip... actually Im using this plugin : http://forums.alliedmods.net/showthread.php?t=147276 , it is very hard to code it for me , I have got so many errors...

And now the Bunny Hop plugin : (Im gonna post the original) : http://forums.alliedmods.net/showthread.php?p=610329

And now I will tell you how I want to use this plugin : The Bunny Hop will be enabled for all players . But , when VIP(and admins) player write /vipmenu to the chat , he can disable the Bunny-Hopping in the menu (only for him)..... Thats all.....

VIPmenu is coded in vip plugin

And I have got error messages like this : 41.: loose identation , invalid expression assumed zero. etc...
Attached Files
File Type: sma Get Plugin or Get Source (svmplugintest.sma - 481 views - 1.3 KB)

Last edited by Melisko; 06-16-2011 at 17:15. Reason: vipmenu + error messages
Melisko 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 23:28.


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