Jump to content
Sign in to follow this  
TeG!^ KenT..

Cerere Plugin [REZOLVAT]

Recommended Posts

Server :TEG.RANGFORT.RO

Nick :TeG!^ KenT
Grad server :Fondator
La ce doriţi ajutor? :Vreau si eu un pluing de ss in care sa faca in felul urmator amx_ss nick si id-ul tau dar sa il vada jucatorul caruia iai facut pozele dar sa faca automat 5 poze 4 normale si una verde

daca ma puteti ajuta va rog

Share this post


Link to post
Share on other sites

Vreau si eu un pluing de ss in care sa faca in felul urmator amx_ss nick si id-ul tau dar sa il vada jucatorul caruia iai facut pozele

Sa vada ip-ul si nick-ul adminului care a executat comanda , tu vrei ?! Sau cum?!

 

nu vreau sa faca id-ul de mess

Mai lamurit , nu am inteles nimic ! Cum ai vrea tu ca pluginul sa-ti genereze singur aidiul de mess al adminului ?! =))) Asa ceva nu este posibil !

Share this post


Link to post
Share on other sites

Cred ca la asta te-ai referit , vezi ca trebuie sa tastezi in consola : amx_ss <nick-ul presupusului codat> <id admin>


#include <amxmodx>

#include <amxmisc>

#include <cstrike>

#include <colorchat>

 

#define PLUGIN_NAME "Advanced Screen Shot"

#define PLUGIN_VERS "1.1"

#define PLUGIN_AUTH "GhosT ***"

 

#define ADMIN_FLAGS "c" // ADMIN KICK

#define None "" // Clear const[] :D

 

// Variabile

 

new TextForScreenShot[168];

 

new CurrentTeam[33];

new CurrentScreenShots[33];

 

// Others

 

new bool:ScoreBoardShow[33];

 

new iPlayer;

 

// Infos

 

new PlayerName[32];

new AdminName[32];

 

new PlayerIp[32];

new AdminIp[32];

 

new PlayerAuth[32];

new AdminAuth[32];

 

// Cvars

 

new MinutesToGive;

 

public plugin_init( )

{

register_plugin(PLUGIN_NAME, PLUGIN_VERS, PLUGIN_AUTH);

register_cvar("ScreenShot_Version", PLUGIN_VERS, FCVAR_SERVER | FCVAR_SPONLY);

 

register_concmd("amx_ss", "ScreenShotConCmd", ADMIN_KICK, "<Nick-ul Presupusului Codat> <Id Admin>");

register_concmd("amx_screenshot", "ScreenShotConCmd", ADMIN_KICK, "<Nick-ul Presupusului Codat> <Id Admin>");

 

MinutesToGive = register_cvar("AdvancedSS_Minutes", "3");

}

public ScreenShotConCmd(id)

{

if(get_user_flags(id) & read_flags(ADMIN_FLAGS))

{

new szFirstArgument[32], szSecondArgument[32];

 

read_argv(1, szFirstArgument, sizeof(szFirstArgument));

read_argv(2, szSecondArgument, sizeof(szSecondArgument));

 

if(equal(szFirstArgument, None) || equal(szSecondArgument, None))

{

client_print(id, print_console, "amx_ss <Nick-ul Presupusului Codat> <Id Admin>");

return PLUGIN_HANDLED;

}

 

iPlayer = cmd_target(id, szFirstArgument, CMDTARGET_NO_BOTS);

 

if(!iPlayer)

{

client_print(id, print_console, "Jucatorul %s nu exista sau nu este conectat !", szFirstArgument);

return PLUGIN_HANDLED;

}

if(!is_user_alive(iPlayer))

{

client_print(id, print_console, "Jucatorul %s este mort !", szFirstArgument);

return PLUGIN_HANDLED;

}

 

get_user_name(iPlayer, PlayerName, sizeof(PlayerName) -1);

get_user_name(id, AdminName, sizeof(AdminName) -1);

 

get_user_ip(iPlayer, PlayerIp, sizeof(PlayerIp) -1);

get_user_ip(id, AdminIp, sizeof(AdminIp) -1);

 

get_user_authid(iPlayer, PlayerAuth, sizeof(PlayerAuth) -1);

get_user_authid(id, AdminAuth, sizeof(AdminAuth) -1);

 

ColorChat(0, RED, "^x04| ScreenShot:^x03 %s^x01 ia facut^x04 4 poze^x01 lui^x03 %s^x01 !", AdminName, PlayerName);

log_amx("ADMIN: %s (#%s) makes Screen Shots his %s (#%s)", AdminName, AdminAuth, PlayerName, PlayerAuth);

 

new Float:Minutes = get_pcvar_float(MinutesToGive) * 60.0;

 

// ========================================================================================================================================

 

// Admin Functions

 

ColorChat(id, RED, "^x04 Poza facuta lui^x03 %s^x01 pe serverul^x03 %s^x04 !", PlayerName, HostName( ));

ColorChat(id, RED, "^x04 Nume admin:^x03 %s^x01 |^x04 Nume presupus codat:^x03 %s^x01 !", AdminName, PlayerName);

ColorChat(id, RED, "^x04 Ip admin:^x03 %s^x01 |^x04 Ip presupus codat:^x03 %s^x01 !", AdminIp, PlayerIp);

ColorChat(id, RED, "^x04 Data & Ora:^x03 %s^x04 !", TheTime( ));

 

set_hudmessage(0, 0, 255, 0.60, 0.40, 0, 5.0, 10.0);

show_hudmessage(id, "Poza pentru Ban List !");

 

client_cmd(id, "; screenshot");

 

set_task(5.0, "Messages", id);

set_task(Minutes, "BanThis", id);

 

// End Admin Functions

 

// ========================================================================================================================================

 

// Target Functions

 

CurrentTeam[iPlayer] = get_user_team(iPlayer);

 

ColorChat(iPlayer, RED, "^x04 Poza facuta de catre adminul^x03 %s^x01 pe serverul^x03 %s^x04 !", AdminName, HostName( ));

ColorChat(iPlayer, RED, "^x04 Nume:^x03 %s^x01 |^x04 Data & Ora:^x03 %s", PlayerName, TheTime( ));

ColorChat(iPlayer, RED, "^x04 Server:^x03 %s", HostName( ));

ColorChat(iPlayer, RED, "^x04 Ip:^x03 %s", PlayerIp)

 

client_cmd(iPlayer, "; spk misc/antend");

 

set_task(0.1, "ScreenShot", iPlayer);

set_task(0.8, "ScreenShot", iPlayer);

set_task(1.5, "Blind", iPlayer);

set_task(2.2, "ScreenShot", iPlayer);

set_task(2.6, "Screboard", iPlayer);

set_task(2.8, "ScreenShot", iPlayer);

 

set_task(3.0, "GoSpec", iPlayer);

set_task(Minutes + 2.0, "GoBack", iPlayer);

 

// End Target Functions

 

format(TextForScreenShot, sizeof(TextForScreenShot), "%s", szSecondArgument);

 

return PLUGIN_CONTINUE;

}

else

{

client_print(id, print_console, "Nu ai acces la aceasta comanda !");

return PLUGIN_HANDLED;

}

 

return PLUGIN_HANDLED;

}

public Messages(id)

{

ColorChat(0, RED, "(ADMIN) %s^x01:^x04 ID Messenger:^x03 %s^x04 ! Ai^x03 %d minut%s + BUZZ^x04 !", AdminName, TextForScreenShot, get_pcvar_num(MinutesToGive), get_pcvar_num(MinutesToGive) == 1 ? "" : "e");

ColorChat(0, RED, "(ADMIN) %s^x01:^x04 ID Messenger:^x03 %s^x04 ! Ai^x03 %d minut%s + BUZZ^x04 !", AdminName, TextForScreenShot, get_pcvar_num(MinutesToGive), get_pcvar_num(MinutesToGive) == 1 ? "" : "e");

ColorChat(0, RED, "(ADMIN) %s^x01:^x04 ID Messenger:^x03 %s^x04 ! Ai^x03 %d minut%s + BUZZ^x04 !", AdminName, TextForScreenShot, get_pcvar_num(MinutesToGive), get_pcvar_num(MinutesToGive) == 1 ? "" : "e");

ColorChat(0, RED, "(ADMIN) %s^x01:^x04 ID Messenger:^x03 %s^x04 ! Ai^x03 %d minut%s + BUZZ^x04 !", AdminName, TextForScreenShot, get_pcvar_num(MinutesToGive), get_pcvar_num(MinutesToGive) == 1 ? "" : "e");

ColorChat(0, RED, "(ADMIN) %s^x01:^x04 ID Messenger:^x03 %s^x04 ! Ai^x03 %d minut%s + BUZZ^x04 !", AdminName, TextForScreenShot, get_pcvar_num(MinutesToGive), get_pcvar_num(MinutesToGive) == 1 ? "" : "e");

}

public ScreenShot(iPlayer)

{

CurrentScreenShots[iPlayer]++;

 

client_cmd(iPlayer, "; screenshot");

 

set_hudmessage(0, 0, 255, 0.60, 0.40, 0, 5.0, 10.0);

show_hudmessage(iPlayer, "Poza %d/4", CurrentScreenShots[iPlayer]);

 

if(CurrentScreenShots[iPlayer] == 4)

CurrentScreenShots[iPlayer] = 0;

}

public Blind(iPlayer)

{

message_begin(MSG_ONE, get_user_msgid("ScreenFade"), _, iPlayer);

write_short(floatround(4096.0 * 1.0, floatround_round));

write_short(floatround(4096.0 * 1.0, floatround_round));

write_short(0x0000);

write_byte(0);

write_byte(255);

write_byte(20);

write_byte(250);

message_end( );

}

public Screboard(iPlayer)

{

ScoreBoardShow[iPlayer] = true;

 

set_task(0.1, "ShowScoreBoard", iPlayer, _, _, "b");

}

public ShowScoreBoard(iPlayer)

{

if(ScoreBoardShow[iPlayer])

client_cmd(iPlayer, "+showscores");

 

ScoreBoardShow[iPlayer] = false

 

if(!ScoreBoardShow[iPlayer])

client_cmd(iPlayer, "-showscores");

}

public GoSpec(iPlayer)

{

cs_set_user_team(iPlayer, CS_TEAM_SPECTATOR, CS_DONTCHANGE);

user_silentkill(iPlayer);

}

public GoBack(iPlayer)

{

if(is_user_connected(iPlayer))

{

switch(CurrentTeam[iPlayer])

{

case 1:

{

cs_set_user_team(iPlayer, CS_TEAM_T, CS_T_ARCTIC);

 

if(is_user_alive(iPlayer))

user_silentkill(iPlayer);

}

case 2:

{

cs_set_user_team(iPlayer, CS_TEAM_CT, CS_CT_SAS);

 

if(is_user_alive(iPlayer))

user_silentkill(iPlayer);

}

case 3..100:

{

cs_set_user_team(iPlayer, CS_TEAM_SPECTATOR, CS_DONTCHANGE);

 

if(is_user_alive(iPlayer))

user_silentkill(iPlayer);

}

}

}

}

public BanThis(id)

{

new MenuTitle[168];

formatex(MenuTitle, sizeof(MenuTitle), "\d|\r Screen Shot\d |\y Vrei sa ii dai ban lui\r %s\y ?", PlayerName);

 

new BanMenu = menu_create(MenuTitle, "BanHandler", 0);

 

menu_additem(BanMenu, "\yDa", "1", 0, -1);

menu_additem(BanMenu, "\yNu", "2", 0, -1);

 

menu_setprop(BanMenu, MPROP_EXIT, MEXIT_NEVER);

menu_display(id, BanMenu);

}

public BanHandler(id, BanMenu, item)

{

if(item == MENU_EXIT)

return PLUGIN_HANDLED;

 

new data[6], szName[64];

new accesss, callback;

 

menu_item_getinfo(BanMenu, item, accesss, data, sizeof(data), szName, sizeof(szName), callback);

 

switch(str_to_num(data))

{

case 1:

{

client_cmd(id, "wait");

client_cmd(id, "amx_addban %s 0 ^"Neprezentare Screen Shot^"", PlayerIp);

 

set_hudmessage(0, 255, 0, -1.0, -1.0, 0, 5.0, 10.0);

show_hudmessage(0, "%s: %s Banned ! (IP: %s)", AdminName, PlayerName, PlayerIp);

}

case 2:

{

set_hudmessage(0, 255, 0, -1.0, -1.0, 0, 5.0, 10.0);

show_hudmessage(0, "%s: %s Curat ! (IP: %s)", AdminName, PlayerName, PlayerIp);

}

}

 

menu_destroy(BanMenu);

return PLUGIN_HANDLED;

}

stock HostName( )

{

new Host_Name[64];

get_cvar_string("hostname", Host_Name, sizeof(Host_Name) -1);

 

return Host_Name;

}

stock TheTime( )

{

new CurrentTime[32];

get_time("%m/%d/%Y^x01 |^x03 %H:%M:%S", CurrentTime, sizeof(CurrentTime) -1);

 

return CurrentTime;

}

Nu raspund de posibilele erori ! L-am luat de pe google !

  • Like 1

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×