Jump to content

Cerere plugin RESPAWN.DARKCS.RO


Recommended Posts

IP Server: 5.254.86.234:27015

Versiune AmxModX: 1.8.3

Ce plugin doriţi?: un plugin care ofera VIP intre orele 22:00 - 10:00 pe flagul t

Descriere plugin(dacă este necesar):

Link către ultima cerere: 

 

Imagini[opţional]:

Alte precizări:

RESPAWN.DARKCS.RO

5.254.86.234:27015

Link to post
Share on other sites

Nu inteleg imaginea. Ai gasit plugin ?

Link to post
Share on other sites
1 oră în urmă, PARIS a spus:

Nu inteleg imaginea. Ai gasit plugin ?

Era intrebarea "Link către ultima cerere: " si am pus link. 

Nu am gasit plugin.

RESPAWN.DARKCS.RO

5.254.86.234:27015

Link to post
Share on other sites

#include <amxmodx>

 

new const TAG[] = "[TAG]";

 

new bool:vip_free, g_msg_saytext;

 

public plugin_init()

{

register_plugin("Free VIP Giver", "2.0", "cyby")

check_time()

set_task(60.0, "check_time", _, _, _, "b")

set_task(1.0, "hud_mess", _, _, _, "b")

 

g_msg_saytext = get_user_msgid("SayText");

}

 

public check_time()

{

static preluare_ora[3], ora;

get_time("%H", preluare_ora, 2)

ora = str_to_num(preluare_ora)

if(21 >= ora || ora < 11)

{

if(!vip_free)

color(0, ".v%s.g Eventul.e Free VIP.g a fost activat!", TAG)

vip_free = true

server_cmd("amx_default_access ^"t^"")

}

else

{

if(vip_free)

color(0, ".v%s.g Eventul.e Free VIP.g a fost dezactivat!", TAG)

vip_free = false

server_cmd("amx_default_access ^"z^"")

}

server_cmd("amx_reloadadmins")

}

 

public hud_mess()

{

if(vip_free)

{

set_hudmessage(random(256), random(256), random(256), 0.00, 0.17, 1, 1.0, 1.0, 0.1, 0.1)

show_hudmessage(0, "Event V.I.P Free !")

}

}

 

stock color(const id, const input[], any:...)

{

new count = 1, players[32]

static msg[191]

vformat(msg, 190, input, 3)

 

replace_all(msg, 190, ".v", "^4")

replace_all(msg, 190, ".g", "^1")

replace_all(msg, 190, ".e", "^3")

 

if(id) players[0] = id; else get_players(players, count, "ch")

{

for(new i = 0; i < count; i++)

{

if(is_user_connected(players))

{

message_begin(MSG_ONE_UNRELIABLE, g_msg_saytext, _, players)

write_byte(players);

write_string(msg);

message_end();

}

}

}

}

Editezi ora , dupa bunul plac :

if(21 >= ora || ora < 11)

 

tenor.gif?itemid=13624915

 

𝘾𝘼𝙈𝙋𝘼𝙉𝙄𝙀 𝙈𝙊𝘿𝙀𝙍𝘼𝙏𝙊𝙍𝙄 𝙊𝙉 :  (Aici)

𝘾𝙚𝙧𝙚𝙧𝙚 𝘿𝙉𝙎:  (Aici)

Link to post
Share on other sites

vipevent.sma(124) : error 035: argument type mismatch (argument 1)

vipevent.sma(128) : error 035: argument type mismatch (argument 4)

vipevent.sma(130) : error 035: argument type mismatch (argument 1)

Could not locate output file vipevent.amx (compile failed).

 

Am incercat local si online compilarea, dar fara succes.

RESPAWN.DARKCS.RO

5.254.86.234:27015

Link to post
Share on other sites

Mersi, AJMERIKE.

 

Tot ce e pe net am incercat si eu, dar nu functioneaza.

 

RESPAWN.DARKCS.RO

5.254.86.234:27015

Link to post
Share on other sites

O sa il trimit pe pedo,sa ia legatura cu tine.

Link to post
Share on other sites

#include < amxmodx >

#include < amxmisc >

#include < engine >

#include < hamsandwich >

#define VIP_FLAG ADMIN_LEVEL_H

#define MAX_PLAYERS 32

#define HUD_POSITION_X -1.0

#define HUD_POSITION_Y 0.0

#define HUD_COLOR_RED 0

#define HUD_COLOR_GREEN 200

#define HUD_COLOR_BLUE 0

new g_iCvars[ 3 ];

new bool:g_bFreeVipTime;

new bool:g_bAlreadyVip[ MAX_PLAYERS + 1 ];

new g_iCacheFlags[ MAX_PLAYERS + 1 ];

const g_iFlagsBitsum = ( VIP_FLAG | ADMIN_RESERVATION | ADMIN_CHAT | ADMIN_LEVEL_F )

public plugin_init( )

{

register_plugin( "Free VIP", "1.2", "DoNii" );

register_event( "HLTV", "OnNewRound", "a", "1=0", "2=0" );

RegisterHam( Ham_Spawn, "player", "fw_HamSpawnPost", 1 );

g_iCvars[ 0 ] = register_cvar( "free_vip_on", "1" );

g_iCvars[ 1 ] = register_cvar( "free_vip_start_time", "15" );

g_iCvars[ 2 ] = register_cvar( "free_vip_end_time", "22" );

set_task( 1.0, "CheckVips", _, .flags = "b" );

}

public plugin_natives( )

{

register_library( "free_vip" );

register_native( "is_free_vip_time", "native_is_free_vip_time", 0 );

}

public native_is_free_vip_time( iPlugin, iParams )

{

return bool:g_bFreeVipTime;

}

public client_putinserver( id )

{

g_bAlreadyVip[ id ] = ( get_user_flags( id ) & VIP_FLAG ) ? true : false;

}

public client_disconnect( id )

{

ResetFlagsToDefault( id );

g_bAlreadyVip[ id ] = false;

g_iCacheFlags[ id ] = 0;

}

public OnNewRound( )

{

if( ! get_pcvar_num( g_iCvars[ 0 ] ) )

{

return PLUGIN_CONTINUE;

}

g_bFreeVipTime = IsVipHour( get_pcvar_num( g_iCvars[ 1 ] ), get_pcvar_num( g_iCvars[ 2 ] ) );

return PLUGIN_CONTINUE;

}

public CheckVips( )

{

if( ! g_bFreeVipTime || ! get_pcvar_num( g_iCvars[ 0 ] ) )

{

return PLUGIN_HANDLED;

}

set_hudmessage( HUD_COLOR_RED, HUD_COLOR_GREEN, HUD_COLOR_BLUE, HUD_POSITION_X, HUD_POSITION_Y, 0, 6.0, 1.1 );

show_hudmessage( 0, "Happy Hour > Free VIP Start: %dh^n\Happy Hour > Free VIP End: %dh", get_pcvar_num( g_iCvars[ 1 ] ), get_pcvar_num( g_iCvars[ 2 ] ) );

return PLUGIN_CONTINUE;

}

public fw_HamSpawnPost( id )

{

if( ! is_user_alive( id ) || is_user_bot( id ) || ! get_pcvar_num( g_iCvars[ 0 ] ) )

return HAM_IGNORED;

if( g_bFreeVipTime )

{

if( ( get_user_flags( id ) & ADMIN_ADMIN || get_user_flags( id ) & ADMIN_USER ) && ! g_bAlreadyVip[ id ] )

{

g_iCacheFlags[ id ] = get_user_flags( id ); // cache his flags

SetVipFlag( id );

}

}

else

{

if( ! g_bAlreadyVip[ id ] && ( get_user_flags( id ) & VIP_FLAG ) )

{

ResetFlagsBack( id ); // time expired so should the flag

}

}

return HAM_IGNORED;

}

ResetFlagsToDefault( id )

{

remove_user_flags( id )

set_user_flags( id, ADMIN_USER );

}

ResetFlagsBack( id )

{

remove_user_flags( id );

set_user_flags( id, g_iCacheFlags[ id ] );

}

SetVipFlag( id )

{

if( get_user_flags( id ) & ADMIN_USER )

{

remove_user_flags( id, ADMIN_USER );

}

set_user_flags( id, g_iFlagsBitsum );

}

bool:IsVipHour( iStart, iEnd )

{

new iHour; time( iHour );

return bool:( iStart < iEnd ? ( iStart <= iHour < iEnd ) : ( iStart <= iHour || iHour < iEnd ) )

}

Link to post
Share on other sites
Guest
This topic is now closed to further replies.
×
×
  • Create New...