It is currently 23 Sep 2017 03:19






Reply to topic  [ 4 posts ] 
 Modificare plugin "server tasks" 
Author Message
Membru, skill 0
Membru, skill 0

Joined: 14 Jan 2017 19:14
Posts: 21
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Salutare extreamcs! am si eu un plugin de modificat, mai exact:
Este un plugin care intre anumite ore activeaza pluginul de vip free pentru toata lumea.
Ce vreau modificat ? -> pluginul meu de vip, nu este pe baza de flag, ci pe fisier unde inserezi numele jucatorului. Este posibil ca pluginul de mai jos sa poata activa vipul pentru toate categoriile de jucatori de pe server de exemplu in intervalul orar 23:00 PM-09:00 AM ?
Va multumesc frumos!
| Afiseaza codul
#include <amxmodx>
#include <amxmisc>

const TASK_ID = 258;

new task_set = 0;
new inceput,
sfarsit,
flag_vip,
h

public plugin_init()
{
register_plugin("Vip Free!", "3.0", "cyby")

register_dictionary("vip_free.txt")
inceput = register_cvar( "vip_start", "20" );
sfarsit = register_cvar( "vip_end", "23" )
flag_vip = register_cvar( "vip_flag", "524288" )

}

public client_putinserver(id)
{
new o, m, s;
time(o, m, s)
if(o >= get_pcvar_num( inceput ) && o < get_pcvar_num( sfarsit ))
{
if( get_user_flags(id) != get_pcvar_num( flag_vip ) )
{
set_user_flags(id, get_pcvar_num( flag_vip ))
set_task(3.0, "mesaj", id)
set_task(1.0, "hud_mess", _, _, _, "b")
set_task(60.0, "incepe", id)
set_task(60.0, "terminare", id)
}
if( !task_set )
{
set_task( 60.0, "recheck", TASK_ID, _, _, "b" ); // task pus la 1 minut pentru a functiona corect
task_set = 1;
}
}
}
public recheck()
{

time( h, _, _ );

if( h >= 23 )
{
new iPlayers[ 32 ], iNum, i;
get_players( iPlayers, iNum );

for( i = 0; i < iNum; i++ )
{
remove_user_flags( iPlayers[ i ] );
}

server_cmd( "amx_reloadadmins" );

remove_task( TASK_ID );
task_set = 0;
}
}
public incepe(id)
{
new o, m, s;
time(o, m, s)
if(o == get_pcvar_num( inceput ) )
ColorChat(id, "%L", LANG_SERVER, "MESAJ_INCEPUT")
}
public terminare(id)
{
new o, m, s;
time(o, m, s)
if(o == get_pcvar_num( sfarsit ) )
ColorChat(id, "%L", LANG_SERVER, "MESAJ_SFARSIT")
}
public hud_mess()
{
new o, m, s;
time(o, m, s)
if(o >= get_pcvar_num( inceput ) && o < get_pcvar_num( sfarsit ))
{
set_hudmessage(random(256), random(256), random(256), 0.00, 0.17, 1, 1.0, 1.1, 0.1, 0.1, -1)
show_hudmessage(0, "%L", LANG_SERVER, "MESAJ_HUD")
}
}
public mesaj(id)
{
if( get_user_flags(id) && get_pcvar_num( flag_vip ) )
{

ColorChat(id, "%L", LANG_SERVER, "MESAJ_INTRARE", get_pcvar_num( inceput ), get_pcvar_num( sfarsit ))

}
}
stock ColorChat(const id, const input[], any:...) {
new count = 1, players[32];
static msg[191];
vformat(msg, 190, input, 3);

replace_all(msg, 190, "!g", "^4");
replace_all(msg, 190, "!n", "^1");
replace_all(msg, 190, "!t", "^3");

if(id) players[0] = id;
else get_players(players, count, "ch"); {
for(new i = 0; i < count; i++) {
if(is_user_connected(players[i])) {
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}


04 Sep 2017 14:34
Profile multumesc WWW
Membru, skill 0
Membru, skill 0
User avatar

Joined: 13 Sep 2017 15:00
Posts: 11
Detinator Steam: Da
CS Status: Respect care ofera respect...
Fond eXtream: 0
Salut fii mai explicit,zii ne mai exact ca sa te putem ajuta

_________________
BUG-FIX SYSTEM
SpecList
Image Image


13 Sep 2017 15:16
Profile multumesc
Membru, skill 0
Membru, skill 0

Joined: 14 Jan 2017 19:14
Posts: 21
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
vreau ca pluginul atasat sa porneaza pluginul de vip de pe serverul meu pentru toti jucatorii intr un animit interval orar


14 Sep 2017 17:04
Profile multumesc WWW
Online
Utilizator neserios (tepar)
Utilizator neserios (tepar)
User avatar

Joined: 12 Jan 2016 04:59
Posts: 417
Location: include/sk.inc
Detinator Steam: Da
CS Status: Webmaster
Reputatie: Utilizator neserios (tepar!)
Fond eXtream: 0
Avertismente: 2 din 3
andrei.ionut933 wrote:
vreau ca pluginul atasat sa porneaza pluginul de vip de pe serverul meu pentru toti jucatorii intr un animit interval orar


Vezi asta.

| Afiseaza codul
#include <amxmodx>
#include <amxmisc>
//edit skeleton
#define PLUGIN "VIP Gratis"
#define VERSION "2.1"
#define AUTHOR "cyby"


new bool: VIPGRATIS, vipfreestart, vipfreeend, HUDEVENT;

public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)

set_task(10.0, "TASK_CheckTime", _, _, _, "b");
set_task(0.5, "TASK_HUD", _, _, _, "b");

vipfreestart = register_cvar("event_vip_start", "23") //Ora de noapte de setat vip gratis
vipfreeend = register_cvar("event_vip_end", "11") //Ora de zi de setat vip gratis

HUDEVENT = CreateHudSyncObj()
}

public TASK_CheckTime() {
new Hours, Minutes, Seconds;
time(Hours, Minutes, Seconds)
if(Hours >= get_pcvar_num(vipfreestart) && Hours < get_pcvar_num(vipfreeend))
VIPGRATIS = true;
else
VIPGRATIS = false;
}

public client_putinserver(id) {
if(VIPGRATIS) {
if(get_user_flags(id) == read_flags("z")) // (z) Flagul setat pentru accesele la beneficile VIP Gratis ca Jucator
set_user_flags(id, read_flags("t")) // (t) Flagul setat care detine accesele la beneficile VIP
}
}

public TASK_HUD() {
static id
for(id = 1; id <= get_maxplayers(); id++) {
if(is_user_connected(id)) {
new Message[128];
if(VIPGRATIS)
formatex(Message, sizeof(Message)-1, "Evenimentul VIP Gratis este: Pornit (Si se va termina intre orele %d:00)", get_pcvar_num(VIPGRATISend))
else
formatex(Message, sizeof(Message)-1, "Evenimentul VIP Gratis este: Oprit (Incepe intre orele %d:00)", get_pcvar_num(VIPGRATISstart))
set_hudmessage(0, 255, 255, 0.01, 0.23, 0, 6.0, 0.5)
ShowSyncHudMsg(id, HUDEVENT, "%s", Message)
}
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/

_________________
Update
★★★★★★★ Webmaster ★★★★★★★
Learn HTML 100% Completed
Learn CSS 80%
Learn JAVASCRIPT 70%
Learn SQL 72 %
Learn PHP 90 %
Learn BOOTSRAP 42 %
Learn JQUERY 24 %
Learn ANGUALR 15 %
Learn ANGUALR2 5 %
-------------------------------------------
★★★★★★★ Profesionist Gaming ★★★★★★★
Gamer Profesionist
Creator editor Profesionist
---------------------------------
Assassin's Creed: Origins (Pro)
Grand Theft Auto V (Pro)
Counter-Strike 1.6 (Assassin mercilessly)
==============================

-------------------------------------------
★★★★★★★ Service Gaming ★★★★★★★
Counter-Strike 1.6 > Addons & ZOMBIE , CSO MODE , FURIEN , DEATHRUN , CLASSIC <Profesionist>
Gta San Andreas SA:MP {Pawno} |Medium|
Minecraft Plugin & Scripting |High|
CS:GO Sourcemode |Low|
--------------------------------------------


18 Sep 2017 22:38
Profile multumesc
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 41 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  

În cazul în care aveți probleme cu contul trimiteți un email sau mesaj la servicii_extream[arond]yahoo[punct]com

Powered by phpBB® Forum Software © phpBB Group