Raised This Month: $ Target: $400
 0% 

client_authorized triggers twice?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 02-14-2007 , 01:13   Re: client_authorized triggers twice?
Reply With Quote #8

Nope, I put a server_print() at the begining, and if its removed, it does nothing, if I put it in client_putinserver(id) it does it twice :S.
client_authorized(id) does the same, and does it twice.

Code:
public client_authorized(id) {     give_weap(id+6500)     return PLUGIN_HANDLED } public give_weap(id) {     server_print("triggered")     if(task_exists(id+6500)) id -= 6500         if(!is_user_connected(id) && !is_user_connecting(id))     {         remove_task(id+6500)         return PLUGIN_HANDLED     }     if(!is_user_alive(id) && !task_exists(id+6500))       {         //client_print(id,print_chat,"[WeaponSave] You have weapons pending. Please spawn immediately for re-distribution.")         set_task(5.0,"give_weap",id+6500)         return PLUGIN_HANDLED     }     if(g_weapon_hold[id] == 1) return PLUGIN_HANDLED     format(g_Query[id],QUERY_MAX_USER-1,"SELECT WID,WClip,WAmmo,WMode,WAddons,WAddons_Active FROM users_weapons WHERE SteamID='%s'",g_SteamIDS[id])     result = dbi_query(dbc,"%s",g_Query[id])     if(dbi_nextrow(result) > 0)     {         new wid, clip, ammo, mode, extras, extras_active         new num_rows = dbi_num_rows(result)         for(new i=0; i < num_rows;i++)         {             if(g_weapon_hold[id] == 1) return PLUGIN_HANDLED             wid = dbi_field(result,1)             clip = dbi_field(result,2)             ammo = dbi_field(result,3)             mode  = dbi_field(result,4)             extras  = dbi_field(result,5)             extras_active  = dbi_field(result,6)             client_print(id,print_console,"WID: %i",wid)             ts_giveweapon(id,wid,clip,extras)             dbi_nextrow(result)         }         g_weapon_hold[id] = 1         client_cmd(id,"weapon_0")     }     dbi_free_result(result)     server_print("GIVEN")     g_weapon_hold[id] = 1     return PLUGIN_HANDLED }
__________________


Last edited by mysticssjgoku4; 02-14-2007 at 01:18.
mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
 



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 00:41.


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