Raised This Month: $ Target: $400
 0% 

Solved Help coding Godmode for 5secs


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-08-2021 , 23:22   Re: Help coding Godmode for 5secs
Reply With Quote #9

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_aliveid ) )
    {
        
set_user_godmode(idfalse)
        
client_print(idprint_chat"GodMode Off!")
    }

    return 
PLUGIN_HANDLED

__________________

Last edited by Bugsy; 01-09-2021 at 00:03.
Bugsy 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