Raised This Month: $51 Target: $400
 12% 

Amount choices within cvars


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Unidentified
Senior Member
Join Date: Aug 2005
Location: Compton, L.A. Thug
Old 01-07-2006 , 13:00   Amount choices within cvars
Reply With Quote #1

When you create a cvar, how would you make It so that It gives however many you desire? For example, If I had a cvar for 30 xp per kill. How would I do this?
Unidentified is offline
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 01-07-2006 , 13:07  
Reply With Quote #2

Change your subject to be more indicative of the purpose of your thread. Subjects should always be descriptive. Failure to do so may result in the thread being trashed.
Brad is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 01-07-2006 , 13:28  
Reply With Quote #3

Not sure what you mean, like this?:

Code:
#include <amxmodx> #include <amxmisc> new xp[33]; public plugin_init() {     register_plugin("spam","hat","pants");         register_cvar("amx_xp_per_kill","30");         register_event("DeathMsg","CheckDeath","a"); } public CheckDeath() {     new atk = read_data(1), vic = read_data(2);     if(!atk)     {         return;     }         xp[atk] += get_cvar_num("amx_xp_per_kill");         return; } public client_disconnect(id) {     xp[id] = 0; }
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
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 22:32.


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