PDA

View Full Version : CERERE plugin WG



trakat
10-09-2017, 11:34 AM
Plugin: numele pluginului dorit
Descriere: doresc plugin /wg si /report
Versiune: versiunea pluginului dorit
Autor: specifica autorul pluginului, daca este cazul
Flaguri: specifica flagurile dorite (literele de acces), daca este cazul

MACAR O ideie cum sa`l fac , multumesc frumos


public client_putinserver(id)
{
g_WGAnnounceA[id] = 0


if(is_user_admin(id))
{
g_Owner[id] = 1;
ActivateNoAdminSystem = 0;
}
set_task(10.0, "Anunt", id);
set_task(20.0, "Anunt2", id);
set_task(30.0, "Anunt", id);
set_task(40.0, "Anunt2", id);
}
public Anunt(id)
{
set_hudmessage(255, 255, 255, 0.02, 0.25, 0, 6.0, 10.0);
show_hudmessage(id, "Vrei sa organizezi un mix? ");
}
public Anunt2(id)
{
set_hudmessage(255, 255, 255, 0.02, 0.25, 0, 6.0, 10.0);
show_hudmessage(id, "Acum poti cere War god tastand /wg nume");
}
public client_disconnect(id)
{
if(g_Owner[id] == 1)
{
g_Owner[id] = 0;
g_OwnerAnnounce = 0;
g_OwnerAnnounceA[id] = 0;
}
}


public setari( id )
{
if( get_user_flags( id ) & ADMIN_KICK )
{

static iSize = sizeof ( g_szInterpCommands );

for( new i = 0; i < iSize; i++ )
client_cmd( 0, g_szInterpCommands[ i ] );

new szName[ 32 ];
get_user_name( id, szName, sizeof ( szName ) -1 );

CC_ColorChat ( id, GREEN, "%s^1 Ai impus setarile pentru mix tuturor jucatorilor. ", TAG);
CC_ColorChat ( 0, GREEN, "%s^1 Ti-au fost actualizate urmatoarele setari: ^4ex_interp 0.01/cl_updaterate 101/cl_cmdrate 105/rate 25000", TAG);

return PLUGIN_HANDLED;
}
return PLUGIN_HANDLED;
}


public Cmd_Say1(id)
{
if( g_Nosay && !gowner(id) )
{
CC_ColorChat(id, GREEN, "%s^1 Canalul ^3SAY^1 este blocat pentru playeri, foloseste ^4say_team", TAG);
return PLUGIN_HANDLED_MAIN;
}


return PLUGIN_CONTINUE;
}


public hookSay( id )
{
new szSaid[ 192 ];
read_args( szSaid, sizeof( szSaid ) -1 );
remove_quotes( szSaid );


if( contain( szSaid, "/wg" ) != -1 )
{
if( g_RoundHalf != 0 )
{
if(g_WGAnnounceA[id] == 1)
{
ColorChat(id, GREEN, "^x04%s^x01 Deja ai cerut WG unei persoane pe aceasta mapa.", TAG);
return PLUGIN_HANDLED;
}
else
{
if( get_user_flags( id ))
{
new target[ 32 ], timestamp[32], authid[32];
copy( target, sizeof( target ) -1, szSaid[ 6 ] );

new id2 = cmd_target( id, target, 2 );
if( id2 )
{
//g_WG[id] = 1;
g_WGAnnounceA[id] = 1;
static szName[ 32 ], szName1[ 32 ], ip[ 32 ];
get_time("%m/%d/%Y - %H:%M:%S",timestamp,31)
get_user_ip(id,ip,31,1);
get_user_name( id, szName1, sizeof( szName1 ) -1 );
get_user_name( id2, szName, sizeof( szName ) -1 );
get_user_authid(id2, authid, 31)


set_hudmessage(255, 255, 255, 0.02, 0.25, 0, 6.0, 5.0);
show_hudmessage(id, "SteamID-ul lui %s ce i s-a cerut War God^n%s", szName, authid);


ColorChat(0, GREEN, "^x04%s^x01 Jucatorul^x04 %s^x01 ii cere War God lui^x04 %s^x01 - Data/Ora:^x04 [%s]", TAG, szName1, szName, timestamp);
//ColorChat(0, GREEN, "^x04%s^x01 SteamID-ul persoanei ce i s-a cerut War God:^x04 %s", TAG, authid);
ColorChat(0, GREEN, "^x04%s^x01 De asemenea are si el o poza cu mesajul ca ia cerut, in caz ca duce la ban are dovada.", TAG);
client_cmd(id,"wait;wait;wait;wait;wait;wait;wait;wait;wait;snaps hot");
}
else
{
ColorChat(id, GREEN, "^x04%s^x01 Jucatorul specificat nu exista.", TAG);
return PLUGIN_HANDLED;
}
}
else
{
ColorChat(id, GREEN, "^x04%s^x01 Nu ai acces la aceasta comanda.", TAG);
return PLUGIN_HANDLED;
}
}
}
else
{
ColorChat(id, GREEN, "^x04%s^x01 Ca sa ceri War God cuiva trebuie sa fie mai intai un Mix activ.", TAG);
return PLUGIN_HANDLED;
}
}
else if( contain( szSaid, "/report" ) != -1 )
{
if( g_Report[id] )
{
CC_ColorChat(id, GREEN, "%s^1 In timpul unui MIX poti folosi ^3/report^1 o singura data.", TAG)
return 1;
}


new cmd[12], name[16], reason[32]
parse( szSaid, cmd, charsmax(cmd), name, charsmax(name), reason, charsmax(reason) )


if( !name[0] || !reason[0] )
{
CC_ColorChat(id, GREEN, "%s^1 Utilizare: /report Nume ^"Motivul reclamatiei^"", TAG)
return 1;
}


new sender[32]
get_user_name(id, sender, charsmax(sender))


_SendReport( sender, name, reason )


g_Report[id] = true


CC_ColorChat(id, GREEN, "%s^1 Ai expediatul reportul.", TAG )
return 1;

return PLUGIN_HANDLED;

~Wolf~
10-09-2017, 01:02 PM
Spune mai concret si precis unde bati cu acest plugin.Adica ce vrei sa faca mai exact?

trakat
10-09-2017, 01:21 PM
dorect sa fie Ceva de genu :) , sper sa ma ajuti Wolf
x04%s^x01 Deja ai cerut WG unei persoane pe aceasta mapa.
1 Jucatorul^x04 %s^x01 ii cere War God lui^x04 %s^x01 - Data/Ora:^x04 [%s]", TAG, szName1, szName, timestamp);
//ColorChat(0, GREEN, "^x04%s^x01 SteamID-ul persoanei ce i s-a cerut War God:^x04 %s", TAG, authid);
ColorChat(0, GREEN, "^x04%s^x01 De asemenea are si el o poza cu mesajul ca ia cerut, in caz ca duce la ban are dovada.", TAG)

ColorChat(id, GREEN, "^x04%s^x01 Ca sa ceri War God cuiva trebuie sa fie mai intai un Mix activ.", TAG);
return PLUGIN_HANDLED;
}
}
else if( contain( szSaid, "/report" ) != -1 )
{
if( g_Report[id] )
{
CC_ColorChat(id, GREEN, "%s^1 In timpul unui MIX poti folosi ^3/report^1 o singura data.", TAG)
return 1;
}


new cmd[12], name[16], reason[32]
parse( szSaid, cmd, charsmax(cmd), name, charsmax(name), reason, charsmax(reason) )


if( !name[0] || !reason[0] )
{
CC_ColorChat(id, GREEN, "%s^1 Utilizare: /report Nume ^"Motivul reclamatiei^"", TAG)


Daca doresti poti sa`l sal faci direct aici

#include <amxmodx>
#include <amxmisc>

public plugin_init()
{
register_plugin("Player Report", "1.0", "Unhask")

register_clcmd("say /report", "report_player")
}

public report_player(id)
{
new arg[32], name[32], cheater[32]

read_argv(1, arg, 31)

new player = cmd_target(id, arg, 9);

get_user_name(id, name, 31)
get_user_name(player, cheater, 31)

chat_color(id, "!gAi raportat corect !tjucatorul!g. Acum asteapta ca adminii sa isi faca treaba.")

client_cmd(id, "say_team @ !gJucatorul !t%s !ga fost raportat de !t%s!g !!", name, cheater)

return 1;

}

stock chat_color(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[320]
vformat(msg, 190, input, 3)
replace_all(msg, 190, "!g", "^4")
replace_all(msg, 190, "!n", "^1")
replace_all(msg, 190, "!t", "^3")
replace_all(msg, 190, "!t2", "^0")
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()
}
}
}
}

~Wolf~
10-09-2017, 03:37 PM
Voi incerca sa vad ce pot sa fac.NU promit ca il rezolv , va dura cateva zile(2-3zile) sau mai putin ,depinde si de timpul meu.De asemenea daca colegii mei au acest plugin ii rog sa il posteze.

~Wolf~
11-09-2017, 11:49 AM
//Edited by Wolf
//Visit www . wargods . ro

#include <amxmodx>

new MaxPlayers;

public plugin_init()
{
register_plugin("Report Player" , "2.0" , "SuNLiNE");
register_cvar("Report_Player" , "2.0" , FCVAR_SERVER);
register_cvar("report_message" ,"1");

register_clcmd("say" , "cmdSay");

MaxPlayers = get_maxplayers();
}

public cmdSay(client)
{
static ReportedName[32] , message[64] , command[16];

read_args(message , charsmax(message));
remove_quotes(message);

parse(message , command, 15 , ReportedName , charsmax(ReportedName));

if(!equali(command , "/report"))
if(!equali(command , "/raport"))
{
return PLUGIN_CONTINUE;
}

new Player = find_player("bl" , ReportedName);

if(is_user_connected(Player))
{
get_user_name(Player , ReportedName, charsmax(ReportedName));

static ReporterName[32];
get_user_name(client , ReporterName, charsmax(ReportedName));

{
ColorChat(client ,"!g*[Report System] : !t%s!g, mesajul tau a fost trimis cu succes adminilor!" , ReporterName);
}

if(!Player)
return PLUGIN_HANDLED;

for(new admins = 1 ; admins <= MaxPlayers ; admins++)
{
if(is_user_connected(admins) && is_user_admin(admins))
{
ColorChat(admins ,"!g*[Report System] : !t%s !groaga adminii sa-i faca un test WarGods lui !t%s!g!" , ReporterName , ReportedName);
}
}
}
return PLUGIN_HANDLED;
}

stock is_user_admin(id)
{
return (get_user_flags(id) > 0 && !(get_user_flags(id) & ADMIN_USER));
}

public client_putinserver(id)
{
set_task(20.0 , "report_message" , id)

}

public report_message(id)
{
if (get_cvar_num("report_message"))
{
new name[32]
get_user_name(id , name ,sizeof(name) -1)

ColorChat(id,"!g*[Report System] : !tPentru a cere un test WarGods unui jucator tasteaza : !g/report ^"nume codat^"");
}
}

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")
replace_all(msg, 190, "!t2", "^0")

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, get_user_msgid("SayText"), _, players[i])
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}


[I]Sper ca este ceea ce cereai.

Last edited by ~AngeL~

Motiv: stergere reclama din sma-ul pluginului

trakat
11-09-2017, 06:12 PM
multumesc mult :* , verifica te rog PM :)

~Wolf~
12-09-2017, 03:30 PM
Uite aici pluginul compilat:
wGods_report.amxx (<b>You have to register to ba able to see this link</b>)

Atentie ! Va trebui sa adaugi ColorChat.inc in addons/amxmodx/scripting/include

colorchat.inc (<b>You have to register to ba able to see this link</b>)

Sursa modificata:

//Edited by Wolf
//Visit www . wargods . ro

#include <amxmodx>
#include <ColorChat>

new MaxPlayers;

public plugin_init()
{
register_plugin("Report Player" , "2.0" , "SuNLiNE");
register_cvar("Report_Player" , "2.0" , FCVAR_SERVER);
register_cvar("report_message" ,"1");

register_clcmd("say" , "cmdSay");

MaxPlayers = get_maxplayers();
}

public cmdSay(client)
{
static ReportedName[32] , message[64] , command[16];

read_args(message , charsmax(message));
remove_quotes(message);

parse(message , command, 15 , ReportedName , charsmax(ReportedName));

if(!equali(command , "/report"))
if(!equali(command , "/raport"))
{
return PLUGIN_CONTINUE;
}

new Player = find_player("bl" , ReportedName);

if(is_user_connected(Player))
{
get_user_name(Player , ReportedName, charsmax(ReportedName));

static ReporterName[32];
get_user_name(client , ReporterName, charsmax(ReportedName));

{
ColorChat(client , GREEN , "*[Report System]^x01 :^x04 %s^x03 , mesajul tau a fost trimis cu succes adminilor!" , ReporterName);
}

if(!Player)
return PLUGIN_HANDLED;

for(new admins = 1 ; admins <= MaxPlayers ; admins++)
{
if(is_user_connected(admins) && is_user_admin(admins))
{
ColorChat(admins , GREEN , "*[Report System]^x01 :^x04 %s^x03 roaga adminii sa-i faca un test WarGods lui^x04 %s ^x03!" , ReporterName , ReportedName);
}
}
}
return PLUGIN_HANDLED;
}

stock is_user_admin(id)
{
return (get_user_flags(id) > 0 && !(get_user_flags(id) & ADMIN_USER));
}

public client_putinserver(id)
{
set_task(20.0 , "report_message" , id)

}

public report_message(id)
{
if (get_cvar_num("report_message"))
{
new name[32]
get_user_name(id , name ,sizeof(name) -1)

ColorChat(id, GREEN , "*[Report System]^x01 : ^x03Pentru a cere un test WarGods unui jucator tasteaza :^x04 /report ^"nume codat^"");
}
}

Last edited by ~AngeL~

Motiv: stergere reclama din sma-ul pluginului

~Wolf~
17-09-2017, 05:16 PM
Multumesc , Angel , nu am vazut acea reclama , scuza-ma.Inchid topic-ul deoarece nu a mai raspuns nimeni,
:locked: