Raised This Month: $ Target: $400
 0% 

[Req] Admin Trail


Post New Thread Reply   
 
Thread Tools Display Modes
Shadymn
Senior Member
Join Date: Sep 2010
Old 12-27-2012 , 06:35   Re: [Req] Admin Trail
Reply With Quote #11

BUMP
Shadymn is offline
Wolddal[A]
Member
Join Date: Sep 2010
Old 12-27-2012 , 08:00   Re: [Req] Admin Trail
Reply With Quote #12


Nah, besides joke, it was requested severel times to edit this plugin in order to make it only for admins.
It's so hard that nobody can fulfill this request ?
Wolddal[A] is offline
Alarm
Senior Member
Join Date: Jan 2011
Location: Shit World
Old 12-27-2012 , 13:31   Re: [Req] Admin Trail
Reply With Quote #13

Quote:
Originally Posted by Wolddal[A] View Post

Nah, besides joke, it was requested severel times to edit this plugin in order to make it only for admins.
It's so hard that nobody can fulfill this request ?
+1
I can't under stand what is hard, I don't know nothing about scripting, but I can see that the plugin of the trail is made, so the only thing to do is to change that only admin will get it, and the other mini requests.
Alarm is offline
Send a message via Skype™ to Alarm
ironskillz1
AlliedModders Donor
Join Date: Jul 2012
Location: Sweden
Old 12-27-2012 , 15:22   Re: [Req] Admin Trail
Reply With Quote #14

here

i know that the code is fucked
but it works to compile i dont now if it works ingame..
Code:
#include < amxmodx >
#include < amxmisc >
#include < fakemeta >
#pragma semicolon 1
#define PLUGIN_VERSION "1.0.0"
#define TRAIL_ACTIVE 1
#define TRAIL_INACTIVE 0
#define TRAIL_LIFE 15
#define ACCES_FLAG  ADMIN_BAN
new gTrailSprite;
new gTrailRandomColor[ 33 ][ 3 ];
new bPlayerTrailStatus[ 33 ];
new Float:bflNextCheck[ 33 ];
new const gTrailSpriteIndex[] = "sprites/zbeam2.spr";
const IN_MOVING = IN_FORWARD | IN_BACK | IN_MOVELEFT | IN_MOVERIGHT | IN_JUMP;
public plugin_init(){ register_plugin( "Owner Trail", PLUGIN_VERSION, "tuty" );  
register_forward( FM_CmdStart, "forward_cmdstart" ); register_clcmd( "say trail", "cmdMakeOwnerTrail" ); 
register_clcmd( "say_team trail", "cmdMakeOwnerTrail" );
}
public plugin_precache(){ 
gTrailSprite = precache_model( gTrailSpriteIndex );
}
public client_connect( id ){ 
bPlayerTrailStatus[ id ] = TRAIL_INACTIVE;
}
public cmdMakeOwnerTrail( id ){ if( !is_user_alive( id ) ) {  
client_print( id, print_chat, "[Trail] Nu poti folosi aceasta comanda cand esti mort!" );  
return PLUGIN_HANDLED; 
}  
if( !( get_user_flags( id ) & ACCES_FLAG ) ) {  
client_print( id, print_chat, "[Trail] Nu ai acces la aceasta comanda!" );   
return PLUGIN_HANDLED; } if( bPlayerTrailStatus[ id ] == TRAIL_ACTIVE ) {  
client_print( id, print_chat, "[Trail] Trailul tau a fost dezactivat!" );  
bPlayerTrailStatus[ id ] = TRAIL_INACTIVE;  
UTIL_KillBeamFollow( id );  
bflNextCheck[ id ] = -5000.0;    
return PLUGIN_HANDLED; }  
else if( bPlayerTrailStatus[ id ] == TRAIL_INACTIVE ) {  
client_print( id, print_chat, "[Trail] Trail activat! Acum ai trail!" );  
bPlayerTrailStatus[ id ] = TRAIL_ACTIVE;    
gTrailRandomColor[ id ][ 0 ] = random_num( 0, 255 );  
gTrailRandomColor[ id ][ 1 ] = random_num( 0, 255 );  
gTrailRandomColor[ id ][ 2 ] = random_num( 0, 255 );    
return PLUGIN_HANDLED; 
}  
return PLUGIN_CONTINUE;
}
public forward_cmdstart( id, handle )
{ 
if( !is_user_alive( id ) || bPlayerTrailStatus[ id ] == TRAIL_INACTIVE ) 
{  
return FMRES_IGNORED; 
}  
new iButton = get_uc( handle, UC_Buttons ); 
if( !( iButton & IN_MOVING ) )     {  
new Float:flGameTime = get_gametime();   
if( bflNextCheck[ id ] < flGameTime )  {   
UTIL_KillBeamFollow( id );   
UTIL_BeamFollow( id );     
bflNextCheck[ id ] = flGameTime + ( TRAIL_LIFE / 8 );  
} 
}  
return FMRES_IGNORED;}  
stock UTIL_BeamFollow( const iClient ){ message_begin( MSG_BROADCAST, SVC_TEMPENTITY ); 
write_byte( TE_BEAMFOLLOW ); 
write_short( iClient ); write_short( gTrailSprite ); 
write_byte( TRAIL_LIFE ); write_byte( 20 ); 
write_byte( gTrailRandomColor[ iClient ][ 0 ] ); 
write_byte( gTrailRandomColor[ iClient ][ 1 ] ); 
write_byte( gTrailRandomColor[ iClient ][ 2 ] ); 
write_byte( 255 ); 
message_end();}stock UTIL_KillBeamFollow( const iClient ){ 
message_begin( MSG_BROADCAST, SVC_TEMPENTITY ); 
write_byte( TE_KILLBEAM );     
write_short( iClient ); 
message_end();
}
__________________
I have many private and unique plugins for Jailbreak and Hide'N'Seek. PM me for more info.

Pm me.

Check out my roulette site.
ironskillz1 is offline
Send a message via Skype™ to ironskillz1
Alarm
Senior Member
Join Date: Jan 2011
Location: Shit World
Old 12-27-2012 , 16:04   Re: [Req] Admin Trail
Reply With Quote #15

Quote:
Originally Posted by ironskillz1 View Post
here

i know that the code is fucked
but it works to compile i dont now if it works ingame..
Code:
#include < amxmodx >
#include < amxmisc >
#include < fakemeta >
#pragma semicolon 1
#define PLUGIN_VERSION "1.0.0"
#define TRAIL_ACTIVE 1
#define TRAIL_INACTIVE 0
#define TRAIL_LIFE 15
#define ACCES_FLAG  ADMIN_BAN
new gTrailSprite;
new gTrailRandomColor[ 33 ][ 3 ];
new bPlayerTrailStatus[ 33 ];
new Float:bflNextCheck[ 33 ];
new const gTrailSpriteIndex[] = "sprites/zbeam2.spr";
const IN_MOVING = IN_FORWARD | IN_BACK | IN_MOVELEFT | IN_MOVERIGHT | IN_JUMP;
public plugin_init(){ register_plugin( "Owner Trail", PLUGIN_VERSION, "tuty" );  
register_forward( FM_CmdStart, "forward_cmdstart" ); register_clcmd( "say trail", "cmdMakeOwnerTrail" ); 
register_clcmd( "say_team trail", "cmdMakeOwnerTrail" );
}
public plugin_precache(){ 
gTrailSprite = precache_model( gTrailSpriteIndex );
}
public client_connect( id ){ 
bPlayerTrailStatus[ id ] = TRAIL_INACTIVE;
}
public cmdMakeOwnerTrail( id ){ if( !is_user_alive( id ) ) {  
client_print( id, print_chat, "[Trail] Nu poti folosi aceasta comanda cand esti mort!" );  
return PLUGIN_HANDLED; 
}  
if( !( get_user_flags( id ) & ACCES_FLAG ) ) {  
client_print( id, print_chat, "[Trail] Nu ai acces la aceasta comanda!" );   
return PLUGIN_HANDLED; } if( bPlayerTrailStatus[ id ] == TRAIL_ACTIVE ) {  
client_print( id, print_chat, "[Trail] Trailul tau a fost dezactivat!" );  
bPlayerTrailStatus[ id ] = TRAIL_INACTIVE;  
UTIL_KillBeamFollow( id );  
bflNextCheck[ id ] = -5000.0;    
return PLUGIN_HANDLED; }  
else if( bPlayerTrailStatus[ id ] == TRAIL_INACTIVE ) {  
client_print( id, print_chat, "[Trail] Trail activat! Acum ai trail!" );  
bPlayerTrailStatus[ id ] = TRAIL_ACTIVE;    
gTrailRandomColor[ id ][ 0 ] = random_num( 0, 255 );  
gTrailRandomColor[ id ][ 1 ] = random_num( 0, 255 );  
gTrailRandomColor[ id ][ 2 ] = random_num( 0, 255 );    
return PLUGIN_HANDLED; 
}  
return PLUGIN_CONTINUE;
}
public forward_cmdstart( id, handle )
{ 
if( !is_user_alive( id ) || bPlayerTrailStatus[ id ] == TRAIL_INACTIVE ) 
{  
return FMRES_IGNORED; 
}  
new iButton = get_uc( handle, UC_Buttons ); 
if( !( iButton & IN_MOVING ) )     {  
new Float:flGameTime = get_gametime();   
if( bflNextCheck[ id ] < flGameTime )  {   
UTIL_KillBeamFollow( id );   
UTIL_BeamFollow( id );     
bflNextCheck[ id ] = flGameTime + ( TRAIL_LIFE / 8 );  
} 
}  
return FMRES_IGNORED;}  
stock UTIL_BeamFollow( const iClient ){ message_begin( MSG_BROADCAST, SVC_TEMPENTITY ); 
write_byte( TE_BEAMFOLLOW ); 
write_short( iClient ); write_short( gTrailSprite ); 
write_byte( TRAIL_LIFE ); write_byte( 20 ); 
write_byte( gTrailRandomColor[ iClient ][ 0 ] ); 
write_byte( gTrailRandomColor[ iClient ][ 1 ] ); 
write_byte( gTrailRandomColor[ iClient ][ 2 ] ); 
write_byte( 255 ); 
message_end();}stock UTIL_KillBeamFollow( const iClient ){ 
message_begin( MSG_BROADCAST, SVC_TEMPENTITY ); 
write_byte( TE_KILLBEAM );     
write_short( iClient ); 
message_end();
}
Thanks !

I tested it, and here the results:

Working:
- The Trail is Only For ADMIN_BAN
- The Trail Is For Admin CT, And Admin Terror.
- The Trail Is Only When The Admin Is Alive.

Not Working:
- The Admin Get's The Trail Automatically On The Beginning Of The Round.
- The Trail Is Changing Color/Type Every 10 Seconds.

So you did a great job for now, i will be great full if you will fix it.
The issue is that the trail not start automatically (you need to write "trail"), it need to start AUTO when the admin is alive and playing, and it can't be turn off.
+ the trail need to change it type every X sec (10 sec).

THANKS
Alarm is offline
Send a message via Skype™ to Alarm
TeddiBer
Senior Member
Join Date: Oct 2011
Old 12-29-2012 , 12:11   Re: [Req] Admin Trail
Reply With Quote #16

Quote:
Originally Posted by Alarm View Post
Thanks !

I tested it, and here the results:

Working:
- The Trail is Only For ADMIN_BAN
- The Trail Is For Admin CT, And Admin Terror.
- The Trail Is Only When The Admin Is Alive.

Not Working:
- The Admin Get's The Trail Automatically On The Beginning Of The Round.
- The Trail Is Changing Color/Type Every 10 Seconds.

So you did a great job for now, i will be great full if you will fix it.
The issue is that the trail not start automatically (you need to write "trail"), it need to start AUTO when the admin is alive and playing, and it can't be turn off.
+ the trail need to change it type every X sec (10 sec).

THANKS
+1
I tested is too, and i have the same missing things you said ...
TeddiBer is offline
pokemonmaster
princess milk
Join Date: Nov 2010
Location: Somewhere in this world
Old 12-29-2012 , 12:43   Re: [Req] Admin Trail
Reply With Quote #17

Try this:
PHP Code:
#include < amxmodx >
#include < amxmisc >
#include < fakemeta >
#include < hamsandwich >

#pragma semicolon 1

#define PLUGIN_VERSION "1.0.0"

#define TASKID        81732519124

#define TRAIL_ACTIVE 1
#define TRAIL_INACTIVE 0
#define TRAIL_LIFE 15
#define ACCES_FLAG  ADMIN_BAN

new gTrailSprite;
new 
gTrailRandomColor33 ][ ];
new 
bPlayerTrailStatus33 ];
new 
Float:bflNextCheck33 ];
new const 
gTrailSpriteIndex[] = "sprites/zbeam2.spr";

const 
IN_MOVING IN_FORWARD IN_BACK IN_MOVELEFT IN_MOVERIGHT IN_JUMP;

public 
plugin_init()

    
register_plugin"Owner Trail"PLUGIN_VERSION"tuty" );  
    
register_forwardFM_CmdStart"forward_cmdstart" );
    
register_clcmd"say trail""cmdMakeOwnerTrail" ); 
    
register_clcmd"say_team trail""cmdMakeOwnerTrail" );
    
    
RegisterHam(Ham_Spawn"player""Fwd_Spawn"1);
}

public 
plugin_precache()

    
gTrailSprite precache_modelgTrailSpriteIndex );
}

public 
client_connectid )

    
bPlayerTrailStatusid ] = TRAIL_INACTIVE;
}

public 
Fwd_Spawn(id)
{
    if(
get_user_flags(id) & ACCES_FLAG)
    {
        
bPlayerTrailStatus[id] = TRAIL_ACTIVE;
        
        
gTrailRandomColorid ][ ] = random_num0255 );  
        
gTrailRandomColorid ][ ] = random_num0255 );  
        
gTrailRandomColorid ][ ] = random_num0255 );
        
        
set_task(10.0"change_color"id TASKID, .flags="b");
    }
}

public 
change_color(taskid)
{
    new 
id taskid TASKID;
    
    if(!
is_user_alive(id))
    {
        
remove_task(taskid);
        return;
    }
    
    
gTrailRandomColorid ][ ] = random_num0255 );  
    
gTrailRandomColorid ][ ] = random_num0255 );  
    
gTrailRandomColorid ][ ] = random_num0255 );    
}

public 
cmdMakeOwnerTrailid )

    if( !
is_user_aliveid ) )
    {  
        
client_printidprint_chat"[Trail] Nu poti folosi aceasta comanda cand esti mort!" );  
        return 
PLUGIN_HANDLED
    }  
    if( !( 
get_user_flagsid ) & ACCES_FLAG ) )
    {  
        
client_printidprint_chat"[Trail] Nu ai acces la aceasta comanda!" );   
        return 
PLUGIN_HANDLED
    } 
    
    if( 
bPlayerTrailStatusid ] == TRAIL_ACTIVE )
    {  
        
        
client_printidprint_chat"[Trail] Trailul tau a fost dezactivat!" );  
        
        
bPlayerTrailStatusid ] = TRAIL_INACTIVE;  
        
        
UTIL_KillBeamFollowid );  
        
        
bflNextCheckid ] = -5000.0;    
        
        return 
PLUGIN_HANDLED
    }  
    
    if( 
bPlayerTrailStatusid ] == TRAIL_INACTIVE 
    {  
        
client_printidprint_chat"[Trail] Trail activat! Acum ai trail!" );  
        
        
bPlayerTrailStatusid ] = TRAIL_ACTIVE;    
        
        
gTrailRandomColorid ][ ] = random_num0255 );  
        
gTrailRandomColorid ][ ] = random_num0255 );  
        
gTrailRandomColorid ][ ] = random_num0255 );    
        
        return 
PLUGIN_HANDLED
    }  
    
    return 
PLUGIN_CONTINUE;
}

public 
forward_cmdstartidhandle )

    if( !
is_user_aliveid ) || bPlayerTrailStatusid ] == TRAIL_INACTIVE 
    {  
        return 
FMRES_IGNORED
    } 
    
    new 
iButton get_uchandleUC_Buttons ); 
    
    if( !( 
iButton IN_MOVING ) ) 
    {
        new 
Float:flGameTime get_gametime();   
        if( 
bflNextCheckid ] < flGameTime )
        {   
            
UTIL_KillBeamFollowid );   
            
UTIL_BeamFollowid );
            
bflNextCheckid ] = flGameTime + ( TRAIL_LIFE );  
        } 
    }  
    
    return 
FMRES_IGNORED;
}  

stock UTIL_BeamFollow( const iClient )
{
    
message_beginMSG_BROADCASTSVC_TEMPENTITY ); 
    
write_byteTE_BEAMFOLLOW ); 
    
write_shortiClient );
    
write_shortgTrailSprite ); 
    
write_byteTRAIL_LIFE );
    
write_byte20 ); 
    
write_bytegTrailRandomColoriClient ][ ] ); 
    
write_bytegTrailRandomColoriClient ][ ] ); 
    
write_bytegTrailRandomColoriClient ][ ] ); 
    
write_byte255 ); 
    
message_end();
}
    
stock UTIL_KillBeamFollow( const iClient )

    
message_beginMSG_BROADCASTSVC_TEMPENTITY ); 
    
write_byteTE_KILLBEAM );     
    
write_shortiClient ); 
    
message_end();

__________________
اَشْهَدُ اَنْ لَّآ اِلٰهَ اِلَّا اللہُ وَحْدَه لَا شَرِيْكَ لَه وَ اَشْهَدُ اَنَّ مُحَمَّدًا عَبْدُه وَرَسُوْلُه
No longer active in AMXX. Sorry.
pokemonmaster is offline
Alarm
Senior Member
Join Date: Jan 2011
Location: Shit World
Old 12-29-2012 , 14:07   Re: [Req] Admin Trail
Reply With Quote #18

Quote:
Originally Posted by pokemonmaster View Post
Try this:
PHP Code:
#include < amxmodx >
#include < amxmisc >
#include < fakemeta >
#include < hamsandwich >

#pragma semicolon 1

#define PLUGIN_VERSION "1.0.0"

#define TASKID        81732519124

#define TRAIL_ACTIVE 1
#define TRAIL_INACTIVE 0
#define TRAIL_LIFE 15
#define ACCES_FLAG  ADMIN_BAN

new gTrailSprite;
new 
gTrailRandomColor33 ][ ];
new 
bPlayerTrailStatus33 ];
new 
Float:bflNextCheck33 ];
new const 
gTrailSpriteIndex[] = "sprites/zbeam2.spr";

const 
IN_MOVING IN_FORWARD IN_BACK IN_MOVELEFT IN_MOVERIGHT IN_JUMP;

public 
plugin_init()

    
register_plugin"Owner Trail"PLUGIN_VERSION"tuty" );  
    
register_forwardFM_CmdStart"forward_cmdstart" );
    
register_clcmd"say trail""cmdMakeOwnerTrail" ); 
    
register_clcmd"say_team trail""cmdMakeOwnerTrail" );
    
    
RegisterHam(Ham_Spawn"player""Fwd_Spawn"1);
}

public 
plugin_precache()

    
gTrailSprite precache_modelgTrailSpriteIndex );
}

public 
client_connectid )

    
bPlayerTrailStatusid ] = TRAIL_INACTIVE;
}

public 
Fwd_Spawn(id)
{
    if(
get_user_flags(id) & ACCES_FLAG)
    {
        
bPlayerTrailStatus[id] = TRAIL_ACTIVE;
        
        
gTrailRandomColorid ][ ] = random_num0255 );  
        
gTrailRandomColorid ][ ] = random_num0255 );  
        
gTrailRandomColorid ][ ] = random_num0255 );
        
        
set_task(10.0"change_color"id TASKID, .flags="b");
    }
}

public 
change_color(taskid)
{
    new 
id taskid TASKID;
    
    if(!
is_user_alive(id))
    {
        
remove_task(taskid);
        return;
    }
    
    
gTrailRandomColorid ][ ] = random_num0255 );  
    
gTrailRandomColorid ][ ] = random_num0255 );  
    
gTrailRandomColorid ][ ] = random_num0255 );    
}

public 
cmdMakeOwnerTrailid )

    if( !
is_user_aliveid ) )
    {  
        
client_printidprint_chat"[Trail] Nu poti folosi aceasta comanda cand esti mort!" );  
        return 
PLUGIN_HANDLED
    }  
    if( !( 
get_user_flagsid ) & ACCES_FLAG ) )
    {  
        
client_printidprint_chat"[Trail] Nu ai acces la aceasta comanda!" );   
        return 
PLUGIN_HANDLED
    } 
    
    if( 
bPlayerTrailStatusid ] == TRAIL_ACTIVE )
    {  
        
        
client_printidprint_chat"[Trail] Trailul tau a fost dezactivat!" );  
        
        
bPlayerTrailStatusid ] = TRAIL_INACTIVE;  
        
        
UTIL_KillBeamFollowid );  
        
        
bflNextCheckid ] = -5000.0;    
        
        return 
PLUGIN_HANDLED
    }  
    
    if( 
bPlayerTrailStatusid ] == TRAIL_INACTIVE 
    {  
        
client_printidprint_chat"[Trail] Trail activat! Acum ai trail!" );  
        
        
bPlayerTrailStatusid ] = TRAIL_ACTIVE;    
        
        
gTrailRandomColorid ][ ] = random_num0255 );  
        
gTrailRandomColorid ][ ] = random_num0255 );  
        
gTrailRandomColorid ][ ] = random_num0255 );    
        
        return 
PLUGIN_HANDLED
    }  
    
    return 
PLUGIN_CONTINUE;
}

public 
forward_cmdstartidhandle )

    if( !
is_user_aliveid ) || bPlayerTrailStatusid ] == TRAIL_INACTIVE 
    {  
        return 
FMRES_IGNORED
    } 
    
    new 
iButton get_uchandleUC_Buttons ); 
    
    if( !( 
iButton IN_MOVING ) ) 
    {
        new 
Float:flGameTime get_gametime();   
        if( 
bflNextCheckid ] < flGameTime )
        {   
            
UTIL_KillBeamFollowid );   
            
UTIL_BeamFollowid );
            
bflNextCheckid ] = flGameTime + ( TRAIL_LIFE );  
        } 
    }  
    
    return 
FMRES_IGNORED;
}  

stock UTIL_BeamFollow( const iClient )
{
    
message_beginMSG_BROADCASTSVC_TEMPENTITY ); 
    
write_byteTE_BEAMFOLLOW ); 
    
write_shortiClient );
    
write_shortgTrailSprite ); 
    
write_byteTRAIL_LIFE );
    
write_byte20 ); 
    
write_bytegTrailRandomColoriClient ][ ] ); 
    
write_bytegTrailRandomColoriClient ][ ] ); 
    
write_bytegTrailRandomColoriClient ][ ] ); 
    
write_byte255 ); 
    
message_end();
}
    
stock UTIL_KillBeamFollow( const iClient )

    
message_beginMSG_BROADCASTSVC_TEMPENTITY ); 
    
write_byteTE_KILLBEAM );     
    
write_shortiClient ); 
    
message_end();

Nice Work !

Work Great, Thanks !
Alarm is offline
Send a message via Skype™ to Alarm
Old 12-29-2012, 16:25
mlkdocs
This message has been deleted by YamiKaitou. Reason: pointless post
Old 12-29-2012, 16:26
mlkdocs
This message has been deleted by YamiKaitou. Reason: pointless post
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 19:58.


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