Raised This Month: $ Target: $400
 0% 

Using remove_task() without check with task_exists()


Post New Thread Reply   
 
Thread Tools Display Modes
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-05-2011 , 15:03   Re: Using remove_task() without check with task_exists()
Reply With Quote #11

Quote:
Originally Posted by Arkshine View Post
He was talking about checking only.
Quote:
Originally Posted by ^SmileY View Post
PHP Code:
public func(Client)
{
    if(
task_exists(Client))
    {
        
client_print(Client,3,"Your Task is running!!");

        
remove_task(Client);
        return 
PLUGIN_HANDLED;
    }
    else
    {
        
client_print(Client,3,"Your Task is  not running!!");
        return 
PLUGIN_HANDLED;
    }
     return 
PLUGIN_HANDLED;

Only for display a message for example, if you try to remove without any message or check, only remove

PHP Code:
public remove(Clientremove_task(Client); 
I'm not sure of it anymore
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 10-05-2011 , 19:04   Re: Using remove_task() without check with task_exists()
Reply With Quote #12

Its only necessary for cheks, ie. Any message

If you want to remove, REMOVE! dont check :S

OMG, its simple
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
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 18:04.


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