Raised This Month: $12 Target: $400
 3% 

small edit please.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Stefanos
Senior Member
Join Date: May 2020
Old 09-03-2020 , 12:59   small edit please.
Reply With Quote #1

hello i need this plugin to be edited:

http://prntscr.com/ub0r4o

this message to show only for player that got SLAY and ADMIN_RCON (flag L )
and that message in red color please!

and please slay on 5 seconds, not every second, thanks <3
Attached Files
File Type: dat fpsmaxslay.dat (1.4 KB, 72 views)

Last edited by Stefanos; 09-03-2020 at 13:07.
Stefanos is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 09-04-2020 , 12:30   Re: small edit please.
Reply With Quote #2

Quote:
Originally Posted by Stefanos View Post
hello i need this plugin to be edited:

http://prntscr.com/ub0r4o

this message to show only for player that got SLAY and ADMIN_RCON (flag L )
and that message in red color please!

and please slay on 5 seconds, not every second, thanks <3
i dont understand anything and i have no idea for how to edit .dat file give me sma and i will try to do what u want but after give me more details
Supremache is offline
Stefanos
Senior Member
Join Date: May 2020
Old 09-04-2020 , 13:14   Re: small edit please.
Reply With Quote #3

Can u look this image http://prntscr.com/ub0r4o

That text i want in red color

Plugin slay player that have more than 125fps
And spam message in chat when someone get slayed
For that. So i want that message i screnshoted to be only seenable
For player that got slayed and for flag L

And if you can make to slay on 5 seconds not every second. Because i use autorespawn..
Stefanos is offline
Stefanos
Senior Member
Join Date: May 2020
Old 09-04-2020 , 13:14   Re: small edit please.
Reply With Quote #4

and .dat file just open with notepad u will get full code.. im not home now. Sorry and thank you sir
Stefanos is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 09-04-2020 , 13:22   Re: small edit please.
Reply With Quote #5

Quote:
Originally Posted by Stefanos View Post
and .dat file just open with notepad u will get full code.. im not home now. Sorry and thank you sir
I will see what i can do

Edit: I think i did what you want but about color i added team color because it's .dat so i think it's working by moudels and i can't add .inc file to it, so i used stock for color chat

P.s: If u want to change max fps, type in console amx_cvar "amx_maxfps" "Max fps Number"
Attached Files
File Type: dat fpsmaxslay.dat (2.4 KB, 44 views)

Last edited by Supremache; 09-04-2020 at 13:43.
Supremache is offline
Stefanos
Senior Member
Join Date: May 2020
Old 09-05-2020 , 01:54   Re: small edit please.
Reply With Quote #6

Can u add that message to be seen only by person that got slayed?
and can u make slay on 5 seconds, not every second.
Stefanos is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 09-05-2020 , 07:19   Re: small edit please.
Reply With Quote #7

Quote:
Originally Posted by Stefanos View Post
Can u add that message to be seen only by person that got slayed?
and can u make slay on 5 seconds, not every second.
1. You said you want only admin rcon and who got slayed can see msg and i did that.

PHP Code:
if(get_user_flags(id) & ADMIN_RCON)
                
ChatColor(0"Player !g%s!t slayed for using more fps than allowed(100)",name)
            else
                
ChatColor(id"!g%s!t slayed for using more fps than allowed(100)",name
2. You said you want who got slayed get spam msg and i already did that
PHP Code:
public playerSpawn(id)
{
    if(!
alive[id])
    {
        new 
name[32]
        
get_user_name(id,name,31)
            
        
ChatColor(id"!g%s!t slayed for using more fps than allowed(100)",name)
        return 
PLUGIN_HANDLED
    
}
    
    
alive[id] = 1
    
return PLUGIN_CONTINUE

3. You said you want who have more than 125 fps get slay every 5 sec not every sec and i did that
changed task from 1.0 to 5.0 "set_task(5.0"

PHP Code:
public client_putinserver(id)
{
    
iFrames[id] = 0
    set_task
(5.0"ShowFps",id+DEVELOPER_OFFSET__"b");

4. there's one thing you can do, Edit those codes
From:

PHP Code:
public eventDeath()
{
    new 
victim read_data(2)
    if(
is_user_valid(victim))
    {
        
alive[victim] = 0
    
}

to:
PHP Code:
public eventDeath()
{
    
set_task(5.0"FactionDeath",id+DEVELOPER_OFFSET__"b");
}

public 
FactionDeath()
{
    new 
victim read_data(2)
    if(
is_user_valid(victim))
    {
        
alive[victim] = 0
    
}


Last edited by Supremache; 09-05-2020 at 07:55.
Supremache is offline
Stefanos
Senior Member
Join Date: May 2020
Old 09-05-2020 , 12:34   Re: small edit please.
Reply With Quote #8

plugin does not work now at all, everyone gots that message evne if they have less fps, and no slay ...
Stefanos is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 09-05-2020 , 12:59   Re: small edit please.
Reply With Quote #9

Quote:
Originally Posted by Stefanos View Post
plugin does not work now at all, everyone gots that message evne if they have less fps, and no slay ...
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

#define DEVELOPER_OFFSET         768
#define MAXWARNS 3
#define is_user_valid(%1) (1 <= %1 <= 32)
new cvar_MaxFps;
new 
iFrames[33]
new 
iWarnings[33]
new 
alive[33]

public 
plugin_init()
{
    
register_plugin("Anti-developer""1.0""NeuTroN aka Menethil"
    
register_forward(FM_PlayerPreThink"Fwd_PlayerPreThink"
    
cvar_MaxFps register_cvar("amx_maxfps""125")
    
register_event"DeathMsg""eventDeath""a" )
    
RegisterHam(Ham_Spawn,"player","playerSpawn")
}

public 
Fwd_PlayerPreThink(id)
{
    if(!
alive[id])
        return 
FMRES_IGNORED
    iFrames
[id]++   
    return 
FMRES_IGNORED
}


public 
client_putinserver(id)
{
    
iFrames[id] = 0
    set_task
(5.0"ShowFps",id+DEVELOPER_OFFSET__"b");
}

public 
ShowFps(id)
{   
    
id-=DEVELOPER_OFFSET
    
if(is_user_alive(id) && iFrames[id] >= get_pcvar_num(cvar_MaxFps))
    {
        
iWarnings[id]++
        if(
iWarnings[id] >= MAXWARNS)
        {
            new 
name[32]
            
get_user_name(id,name,31)

            
user_kill(id)
            
            if(
get_user_flags(id) & ADMIN_RCON)
                
ChatColor(0"Player !g%s!t slayed for using more fps than allowed(100)",name)
            else
                
ChatColor(id"!g%s!t slayed for using more fps than allowed(100)",name)
                
ChatColor(id"!g%s!t slayed for using more fps than allowed(100)",name)
                
ChatColor(id"!g%s!t slayed for using more fps than allowed(100)",name)
                
ChatColor(id"!g%s!t slayed for using more fps than allowed(100)",name)
                
ChatColor(id"!g%s!t slayed for using more fps than allowed(100)",name)
        }
    }       
    
iFrames[id] = 0
}

public 
client_disconnect(id)
{
    if(
task_exists(id+DEVELOPER_OFFSET))
    {
        
remove_task(id+DEVELOPER_OFFSET)
    }
}

public 
playerSpawn(id)
{
    
alive[id] = 1
    
return PLUGIN_CONTINUE
}   

public 
eventDeath()
{
    new 
victim read_data(2)
    if(
is_user_valid(victim))
    {
        
alive[victim] = 0
    
}
}

stock ChatColor(const id, const input[], any:...) 
{
    
    new 
count 1players[32];
    static 
msg[191];
    
vformat(msg190input3);
    
    
replace_all(msg190"!g""^4"); // verde
    
replace_all(msg190"!n""^1"); // galben/alb/negru
    
replace_all(msg190"!t""^3"); // rosu/albastru/gri
    
replace_all(msg190"!t2""^0"); // rosu2/albastru2/gri2
    
    
if (idplayers[0] = id; else get_players(playerscount"ch");
    {
        for (new 
0counti++)
            {
            if (
is_user_connected(players[i]))
                {
                
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i]);
                
write_byte(players[i]);
                
write_string(msg);
                
message_end();
            }
        }
    }

Supremache is offline
Stefanos
Senior Member
Join Date: May 2020
Old 09-05-2020 , 13:26   Re: small edit please.
Reply With Quote #10

everyone get slayed for fps more than 100 even if they have less...
Stefanos is offline
Reply


Thread Tools
Display Modes

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 05:49.


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