Raised This Month: $ Target: $400
 0% 

Solved Help coding Godmode for 5secs


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
loiraolhosazul
Member
Join Date: May 2020
Old 01-08-2021 , 23:32   Re: Help coding Godmode for 5secs
Reply With Quote #10

Quote:
Originally Posted by Bugsy View Post
I don't think you need to check if connected/alive in cmd start...and you never need to do both as alive has a connected check built in so you'd only ever need to check alive. I'd remove the entire if statement.

You do not need to check if the task exists, just call remove_task().

I'd do this
PHP Code:
public RemoveGodMode(id)
{
    
iGodMode[id] = false

    
if(!is_user_connected(id))
    {
        
remove_task(id)
    }
    else
    {
        
set_user_godmode(idfalse)
        
client_print(idprint_chat"GodMode Off!")
    }

    return 
PLUGIN_HANDLED

whatever, both work
loiraolhosazul 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 14:14.


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