Raised This Month: $ Target: $400
 0% 

[REQ] Godmode


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 05-24-2020 , 09:59   Re: [REQ] Godmode
Reply With Quote #9

Make sure these commands for Godmode are correct, in defines i made in plugin, as far as i see logic is correct but still just to check if the plugin is working try with this, if plugin is working then it will print in chat "Plugin is working" when only 1 player is alive from Terrorist team if it doesnt do anything please check if plugin itself is loaded or not, if raising any logs then too, reply here

PHP Code:
#include <amxmodx>
#include <amxmisc>

#define ON_COMMAND "say Plugin is working"
#define OFF_COMMAND "say Plugin back to normal state"

new bool:godMode false

public plugin_init()
{
    
register_plugin("GODMODE - TR""1.0""DiGiTaL")
    
register_event("DeathMsg""onDeathMsgEvent""a")
}

public 
onDeathMsgEvent()
{
    if((
get_playersnum_ex(GetPlayers_ExcludeDead GetPlayers_MatchTeam"TERRORIST") == 1) && !godMode) {
        
godMode true
        server_cmd
(ON_COMMAND)
    }
    else if((
get_playersnum_ex(GetPlayers_ExcludeDead GetPlayers_MatchTeam"TERRORIST") != 1) && godMode) {
        
godMode false
        server_cmd
(OFF_COMMAND)
    }


Last edited by instinctpt1; 05-25-2020 at 02:40. Reason: updated
instinctpt1 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 16:30.


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