Raised This Month: $ Target: $400
 0% 

Cvar setting problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Melisko
Senior Member
Join Date: Feb 2010
Old 06-16-2011 , 10:00   Cvar setting problem
Reply With Quote #1

Hi , I need help with setting some cvars . Here is the part of a plugin:

public svm_item_on( iPlayer, iItemIndex, bool:iPluginON) {

Quote:
if( g_iItemIndex == iItemIndex ) {

if(iPluginON) { get_cvar_string
client_cmd(player_id,";alias bhop_auto")

client_print( iPlayer , print_chat, "Bunny Hop je Zapnuty!")


}
else { client_cmd(player_id,"bhop_auto 0")
client_cmd(player_id,";alias bhop_auto")

client_print( iPlayer , print_chat, "Bunny Hop je Vypnuty!")

}
}

//return if needed here
}
I want to set the cvar bhop_auto like this : if(iPluginON) bhop_auto 1

and this : else bhop_auto 0

Thanks 4 help


////(My script can be find at the bottom of the plugin)////
Attached Files
File Type: sma Get Plugin or Get Source (amx_bhop.sma - 488 views - 6.0 KB)

Last edited by Melisko; 06-16-2011 at 10:16. Reason: full plugin if needed
Melisko is offline
 



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