Raised This Month: $ Target: $400
 0% 

client_authorized triggers twice?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 02-08-2007 , 14:22   client_authorized triggers twice?
Reply With Quote #1

Gah I'm really angry right now, because I've been making a simple* mind you simple plugin that redistributes weapons back to players on join.

Now I've tried setting tasks with "task_exists" and even global variables for stops....no matter what it always EXECUTES TWICE!?!?!?!? W#%(*@#(@$@(%#)$%
I've been working with this for over 2 hours and I'm really annoyed at this point.

Code:
public client_authorized(id) {     give_weapons(id+6500) } public give_weapons(id) {     id -= 6500     if(g_weapon_hold[id] == 1) return PLUGIN_HANDLED     if(!is_user_connected(id) && !is_user_connecting(id))     {         remove_task(id+6500)         return PLUGIN_HANDLED     }     if(!is_user_alive(id))     {         //client_print(id,print_chat,"[WeaponSave] You have weapons pending. Please spawn immediately for re-distribution.")         set_task(5.0,"give_weapons",id+6500)         return PLUGIN_HANDLED     }     if(g_weapon_hold[id] == 1) return PLUGIN_HANDLED     g_weapon_hold[id] = 1     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++)         {             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)         }         client_cmd(id,"weapon_0")     }     dbi_free_result(result)     server_print("GIVEN")     g_weapon_hold[id] = 1     return PLUGIN_HANDLED }

Can anyone help me? Thanks.
__________________

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