Raised This Month: $ Target: $400
 0% 

number not increasing correctly?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
slurpycof
Senior Member
Join Date: Nov 2004
Old 04-19-2005 , 20:14  
Reply With Quote #9

give this a shot
Code:
#include <vault> new lockskill[33] public plugin_init()[     register_cvar("amx_picklvl","5")//points required for each level }   public client_authorized(id){     new authid[32]     get_user_authid(id,authid,31)     if (is_user_hltv(id) ) {  //Do not do anything         return PLUGIN_CONTINUE     }     if ( is_user_bot(id) ) {  //Do not do anything         return PLUGIN_CONTINUE     }     if(vaultdata_exists(authid)){         new vault_lockskill[32]         get_vaultdata(authid,vault_lockskill,31)         lockskill[id] = str_to_num(vault_lockskill)     }else{//No data exists         lockskill[id] = 0     }     return PLUGIN_CONTINUE } public lockskillone(id) {     //BLAH BLAH BLAH     force_use(id,doorid); // use the darn door     client_print(id,print_chat,"* [LockPick] Door has been LockPicked Sucessfully^n");     lockskill[id]++     set_task(0.1, "picklock", id)     return PLUGIN_HANDLED }     public client_disconnect (id){     if ( is_user_bot(id) ) {  //Do not add to database         return PLUGIN_CONTINUE     }     if (is_user_hltv(id) ) {  //Do not add to database         return PLUGIN_CONTINUE     }     new authid[32]     get_user_authid(id,authid,31)     new vault_lockskill[32]     num_to_str(lockskill[id],vault_lockskill,31)     set_vaultdata(authid,vault_lockskill)     return PLUGIN_HANDLED }      public query_picklevel(id, level, cid){     new message [192]     read_args(message, 190)     remove_quotes(message)     if (containi(message,"/picklevel")!=-1) {         if (lockskill[id]== 0) {             client_print(id,print_chat,"You are still a level one lockpicker")         }else{             new picklevel             picklevel = (lockskill[id] / get_cvar_num("amx_picklvl")) //not sure if this works or if you need to assign cvar to a new variable             client_print(id,print_chat,"You are a level %i lockpicker",picklevel)         }         return PLUGIN_HANDLED     }     return PLUGIN_CONTINUE  }
slurpycof 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 09:51.


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