Raised This Month: $ Target: $400
 0% 

[SOLVED] Is it set_task problem?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
akysiev
Junior Member
Join Date: Mar 2006
Location: Earth
Old 03-24-2006 , 08:39  
Reply With Quote #1

It would remove the task for all players since all of them are grouped under task id 0. To solve this, use a unique task id as follows:

Code:
public client_putinserver(id) {     if (is_user_bot(id))         return PLUGIN_HANDLED     if (!connect(sql))     {         log_amx("Error - Couldn't connect to SQL db")         return PLUGIN_HANDLED     }     new idd[1]     idd[0] = id     set_task(60.0, "kac_exists", 50 + id, idd, 1)     return PLUGIN_CONTINUE } public client_disconnect(id) {     remove_task(50 + id); }

Make sure that you don't set any other tasks with an id between 50, or whatever arbitrary number you want to start with, and 82, or 32 plus your number.
akysiev is offline
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 16:41.


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