Raised This Month: $32 Target: $400
 8% 

[REQ] Godmode


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 05-23-2020 , 04:59   [REQ] Godmode
Reply With Quote #1

The following command is activated when a one player is alive in the "T" team

PHP Code:
server_cmd("amx_godmode @ALL 1"); 
otherwise ( 2 players are alive in the "T" team or most of the following commands are activated )

PHP Code:
server_cmd("amx_godmode @ALL 0"); 
alferd is offline
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 05-23-2020 , 05:17   Re: [REQ] Godmode
Reply With Quote #2

So what ?
Please describe atleast what you want, is this a question, a statement or you want these commands to be executed when ur description matches ?
Coz with this provided description, no one could possibly help i guess
instinctpt1 is offline
Old 05-23-2020, 05:17
instinctpt1
This message has been deleted by instinctpt1. Reason: multipost
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 05-23-2020 , 07:06   Re: [REQ] Godmode
Reply With Quote #3

I'm sorry, I don't speak English well

When a one player from the Terrorists team is alive, I want to activate the command ( amx_godmode )

I want this plugin for jailbreak server, "/lr" time
alferd is offline
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 05-23-2020 , 07:38   Re: [REQ] Godmode
Reply With Quote #4

i dont know about jailbreak
But can you tell me when you want plugin to check for this condition ? Like when someone enters /lr command at that time ?
Or just everytime ?
if everytime, then i wrote this one, try:
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) || (get_playersnum_ex(GetPlayers_ExcludeDead GetPlayers_MatchTeam"CT") == 0)) {
        
godMode false
        server_cmd
(OFF_COMMAND)
    }


Last edited by instinctpt1; 05-25-2020 at 02:50. Reason: upd
instinctpt1 is offline
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 05-23-2020 , 08:30   Re: [REQ] Godmode
Reply With Quote #5

Quote:
Originally Posted by instinctpt1 View Post
Like when someone enters /lr command at that time ?
When there is a one player in the Terrorists team, it is time for "lr" ( lr = Last Request )

And at this time I want the following command to be activated

amx_godmode @ALL 1

-----------------------------------

When 2 players are alive in the Terrorists team, it does not mean "lr" time, so the command must be disabled

Last edited by alferd; 05-23-2020 at 08:30.
alferd is offline
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 05-23-2020 , 10:18   Re: [REQ] Godmode
Reply With Quote #6

Hm, then try the one i wrote and provide feedback here
instinctpt1 is offline
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 05-24-2020 , 04:57   Re: [REQ] Godmode
Reply With Quote #7

Quote:
Originally Posted by instinctpt1 View Post
Hm, then try the one i wrote and provide feedback here
nothing happened
alferd is offline
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 05-24-2020 , 09:59   Re: [REQ] Godmode
Reply With Quote #8

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
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 05-24-2020 , 12:47   Re: [REQ] Godmode
Reply With Quote #9

Quote:
Originally Posted by instinctpt1 View Post
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(
godMode) {
        
godMode false
        server_cmd
(OFF_COMMAND)
    }

I tested,

Code:
Round 1 = ON
Round 2 = OFF
Round 3 = ON
Round 4 = OFF
.....
These changes were made when the round ended

Last edited by alferd; 05-24-2020 at 12:47.
alferd is offline
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 05-25-2020 , 02:39   Re: [REQ] Godmode
Reply With Quote #10

My bad, Updated; Now try:

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) || (get_playersnum_ex(GetPlayers_ExcludeDead GetPlayers_MatchTeam"CT") == 0)) {
        
godMode false
        server_cmd
(OFF_COMMAND)
    }


Last edited by instinctpt1; 05-25-2020 at 02:49. Reason: updated
instinctpt1 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 09:07.


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