Reply in Chat & Socialize
care joacă un DR sau un SAMP sau un METIN2 PVP(no farm)?
care joacă un DR sau un SAMP sau un METIN2 PVP(no farm)?
discord, deși eu nu folosesc nici una =)))
nici una :D
în natură clarrr
păi...și cel de la market e natural, d-aia se produce/vinde, e tot aia..
amân2 :)
ZOMBIIIIIIIIIIIIIIIIIIIIIIII :X
sunt doar exemple, cu un start foarte bun.
Un plugin pentru VIP simplu, dar foarte eficient față de restu!
V1
/* Plugin generated by AMXX-Studio */
#include < amxmodx >
#include < hamsandwich >
#include < fun >
#include < fakemeta >
#include < cstrike >
#define PLUGIN "[ CSO ] VIP"
#define VERSION "0.1"
#define AUTHOR "Opo4uMapy"
#define VIP_CSO ADMIN_LEVEL_A
const DMG_HEGRENADE = (1<<24)
new szTwoJump[33], szJump[33], szDoJump[33]
new Float:g_damage[33]
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("ResetHUD", "ResetHUD", "be")
RegisterHam(Ham_Spawn, "player", "SpawnPlayer", 1)
RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
register_forward(FM_PlayerPreThink, "TwoJump")
register_forward(FM_PlayerPostThink, "PostTwoJump")
}
public fw_TakeDamage(victim, inflictor, attacker, Float:damage, damage_type) {
if(victim == attacker)
return HAM_IGNORED
if(damage_type & DMG_HEGRENADE)
return HAM_IGNORED
if(!is_user_connected(attacker))
return HAM_IGNORED
if(~get_user_flags(attacker) & VIP_CSO)
return HAM_IGNORED
g_damage[attacker]+damage
if(g_damage[attacker] > 500.0)
{
//aici setati puncte, bani, ce vreti
g_damage[attacker] -= 500.0//??
}
return HAM_IGNORED
}
public SpawnPlayer(id)
{
if(!is_user_alive(id))
return
if(~get_user_flags(id) & VIP_CSO)
return
//set_user_health(id, get_user_health(id) + 100) setati la spawn orice..
set_user_armor(id, 100)
szTwoJump[id] = true
}
public TwoJump(id)
{
if(szTwoJump[id] && (get_user_flags(id) & VIP_CSO))
{
new szButton = pev(id, pev_button)
new szOldButton = pev(id, pev_oldbuttons)
if((szButton & IN_JUMP) && !(pev(id, pev_flags) & FL_ONGROUND) && !(szOldButton & IN_JUMP))
{
if((szJump[id] < 2)/* && (get_user_flags(id) & ADMIN_LEVEL_A)*/)
{
szDoJump[id] = true
szJump[id]++
return PLUGIN_CONTINUE
}
}
if((pev(id, pev_flags) & FL_ONGROUND))
{
szJump[id] = 0
}
}
return PLUGIN_CONTINUE
}
public PostTwoJump(id)
{
if(szTwoJump[id] && get_user_flags(id) & VIP_CSO)
{
if(!is_user_alive(id))
return PLUGIN_CONTINUE
if(szDoJump[id])
{
new Float:szVelocity[3]
pev(id, pev_velocity, szVelocity)
szVelocity[2] = random_float(295.0,305.0)
set_pev(id, pev_velocity, szVelocity)
szDoJump[id] = false
return PLUGIN_CONTINUE
}
}
return PLUGIN_CONTINUE
}
public client_connect(id)
g_damage[id] = 0.0
public client_disconnect(id)
g_damage[id] = 0.0
public ResetHUD(id)
set_task(0.5, "VIP", id + 6910)
public VIP(TaskID)
{
new id = TaskID - 6910
if(get_user_flags(id) & VIP_CSO)
{
message_begin(MSG_ALL, get_user_msgid("ScoreAttrib"))
write_byte(id)
write_byte(4)
message_end()
}
return PLUGIN_HANDLED
}
V2
#include < amxmodx >
#include < cstrike >
#include < geoip >
#include < fakemeta >
forward vip_connected( const id );
#define ANTI_FLOOD // Uncomment this if you want enable ANTI_FLOOD system
#define COLORED_RADIO // Uncomment this if you want radio messages to be colored
#define ADMIN_SEE_ALL // Uncomment this if you want admins to see all team-chats
new const g_szTeams[ 3 ][ ] = {
"Spectator",
"Terrorist",
"Counter-Terrorist"
};
new g_szCountryCode[ 33 ][ 11 ];
new bool:g_bAdmin[ 33 ];
new g_iMsgSayText;
#if defined ANTI_FLOOD
new Float:g_flLastMsg[ 33 ];
new Float:g_flFlooding[ 33 ];
new g_iFloodCount[ 33 ];
#endif
public plugin_init( ) {
register_plugin( "Fix", "1.1", "xPaw" );
#if defined ANTI_FLOOD
register_dictionary( "antiflood.txt" );
#endif
#if defined COLORED_RADIO
register_message( get_user_msgid( "TextMsg" ), "MessageTextMsg" );
#endif
register_clcmd( "say", "CmdSay" );
register_clcmd( "say_team", "CmdTeamSay" );
g_iMsgSayText = get_user_msgid( "SayText" );
}
public client_authorized( id )
g_bAdmin[ id ] = bool:( get_user_flags( id ) & ADMIN_RCON );
public client_disconnect( id )
g_bAdmin[ id ] = false;
public vip_connected( const id )
add( g_szCountryCode[ id ], 10, "^4[VIP]" );
public client_putinserver( id ) {
new szIP[ 16 ], szCode[ 3 ];
get_user_ip( id, szIP, 15, 1 );
if( szIP[ 0 ] == 'l' )
get_user_ip( 0, szIP, 15, 1 );
if( !geoip_code2_ex( szIP, szCode ) ) {
szCode[ 0 ] = '-';
szCode[ 1 ] = '-';
}
formatex( g_szCountryCode[ id ], 10, "[%s]", szCode );
#if defined ANTI_FLOOD
g_iFloodCount[ id ] = 0;
#endif
}
public CmdSay( id ) {
#if defined ANTI_FLOOD
if( CheckFlood( id ) )
return PLUGIN_HANDLED;
#endif
new szSaid[ 192 ];
read_args( szSaid, 191 );
remove_quotes( szSaid );
new i, x, iTeam = strlen( szSaid );
if( !iTeam ) return PLUGIN_HANDLED;
for( i = 0; i < iTeam; i++ ) {
if( szSaid[ i ] != ' ' ) {
x = 1;
break;
}
}
if( !x ) return PLUGIN_HANDLED;
new szName[ 32 ], szMessage[ 191 ];
for( i = 0; i < iTeam; i++ )
for( x = '^1'; x <= '^4'; x++ )
if( szSaid[ i ] == x )
szSaid[ i ] = ' ';
replace_all( szSaid, 190, "%s", " s" );
get_user_name( id, szName, 31 );
new szTeam[ 2 ];
get_user_team( id, szTeam, 1 );
switch( szTeam[ 0 ] ) {
case 'T': iTeam = 1;
case 'C': iTeam = 2;
default: iTeam = 0;
}
new szTag[ 8 ];
if( !iTeam )
szTag = "*SPEC* ";
else if( !is_user_alive( id ) )
szTag = "*DEAD* ";
formatex( szMessage, 190, "^3%s^1 %s^3%s^1:%s %s", g_szCountryCode[ id ], szTag, szName, g_bAdmin[ id ] ? "^4" : "", szSaid );
szMessage[ 189 ] = '^0';
SendMessage( MSG_BROADCAST, id, 0, szMessage );
// Logs
get_user_authid( id, szMessage, 40 );
log_message( "^"%s<0><%s><%c>^" say ^"%s^"", szName, szMessage, szTeam[ 0 ], szSaid );
return PLUGIN_HANDLED;
}
public CmdTeamSay( id ) {
#if defined ANTI_FLOOD
if( CheckFlood( id ) )
return PLUGIN_HANDLED;
#endif
new szSaid[ 192 ];
read_args( szSaid, 191 );
remove_quotes( szSaid );
new i, x, iTeam = strlen( szSaid );
if( !iTeam ) return PLUGIN_HANDLED;
for( i = 0; i < iTeam; i++ ) {
if( szSaid[ i ] != ' ' ) {
x = 1;
break;
}
}
if( !x ) return PLUGIN_HANDLED;
new szName[ 32 ], szMessage[ 191 ];
for( i = 0; i < iTeam; i++ )
for( x = '^1'; x <= '^4'; x++ )
if( szSaid[ i ] == x )
szSaid[ i ] = ' ';
replace_all( szSaid, 190, "%s", " s" );
new iPlayer, iPlayers[ 32 ], iNum;
get_user_name( id, szName, 31 );
get_players( iPlayers, iNum, "ch" );
new szTeam[ 2 ];
get_user_team( id, szTeam, 1 );
switch( szTeam[ 0 ] ) {
case 'T': iTeam = 1;
case 'C': iTeam = 2;
default: iTeam = 0;
}
formatex( szMessage, 190, "^3%s^1 %s(%s)^3 %s^1:%s %s", g_szCountryCode[ id ], ( iTeam && !is_user_alive( id ) ) ? "*DEAD* " : "", g_szTeams[ iTeam ], szName, g_bAdmin[ id ] ? "^4" : "", szSaid );
szMessage[ 189 ] = '^0';
for( i = 0; i < iNum; i++ ) {
iPlayer = iPlayers[ i ];
#if defined ADMIN_SEE_ALL
if( get_user_team( iPlayer ) == iTeam || g_bAdmin[ iPlayer ] )
#else
if( get_user_team( iPlayer ) == iTeam )
#endif
SendMessage( MSG_ONE_UNRELIABLE, id, iPlayer, szMessage );
}
// Logs
get_user_authid( id, szMessage, 40 );
log_message( "^"%s<0><%s><%c>^" say_team ^"%s^"", szName, szMessage, szTeam[ 0 ], szSaid );
return PLUGIN_HANDLED;
}
#if defined ANTI_FLOOD
public CheckFlood( id ) {
new Float:flGametime = get_gametime( );
if( g_flLastMsg[ id ] + 0.25 > flGametime )
return true;
g_flLastMsg[ id ] = flGametime;
if( g_flFlooding[ id ] > flGametime ) {
if( g_iFloodCount[ id ] >= 3 ) {
client_print( id, print_notify, "** %L **", id, "STOP_FLOOD" );
client_print( id, print_center, "** %L **", id, "STOP_FLOOD" );
g_flFlooding[ id ] = flGametime + 3.75;
return true;
}
g_iFloodCount[ id ]++;
}
else if( g_iFloodCount[ id ] )
g_iFloodCount[ id ]--;
g_flFlooding[ id ] = flGametime + 0.75;
return false;
}
#endif
#if defined COLORED_RADIO
public MessageTextMsg( ) {
if( get_msg_args( ) != 5 || get_msg_arg_int( 1 ) != 5 )
return PLUGIN_CONTINUE;
static szMessage[ 33 ];
get_msg_arg_string( 3, szMessage, 32 );
if( equal( szMessage, "#Game_radio" ) ) {
get_msg_arg_string( 5, szMessage, 32 );
if( equal( szMessage, "#Fire_in_the_hole" ) ) {
get_msg_arg_string( 2, szMessage, 3 );
switch( get_user_weapon( str_to_num( szMessage ) ) ) {
case CSW_HEGRENADE: szMessage = "%s1 (RADIO): %s2 [explosive]";
case CSW_SMOKEGRENADE: szMessage = "%s1 (RADIO): %s2 [smokegren]";
case CSW_FLASHBANG: szMessage = "%s1 (RADIO): %s2 [flashbang]";
default: szMessage = "%s1 (RADIO): %s2";
}
} else
szMessage = "%s1 (RADIO): %s2";
set_msg_arg_string( 3, szMessage );
}
return PLUGIN_CONTINUE;
}
#endif
SendMessage( const iType, const iSender, const id, const szMessage[ ] ) {
message_begin( iType, g_iMsgSayText, _, id );
write_byte( iSender );
write_string( szMessage );
message_end( );
} V5 HLDS cu Orpheu
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <orpheu>
#define PLUGIN "HLDS-Project"
#define VERSION "1.0.5"
#define AUTHOR "SkillartzHD"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
OrpheuRegisterHook(OrpheuGetFunction("SV_DropClient"), "sv_dropclient_f")
// Add your code here...
}
public OrpheuHookReturn:sv_dropclient_f(a[],b[],c[])
{
/*
bCleanDecals= dword pentru -638h // a[]
count= dword pentru -634h // b[]
argptr= dword pentru -630h // c[]
*/
if(containi(c,"Reliable channel overflowed")!=-0x01)
{
return OrpheuSupercede;
}
return OrpheuIgnored;
} Ceva mai complex
#include <amxmodx>
#include <fakemeta>
#define PLUGIN "Crash Logs"
#define VERSION "1.1"
#define AUTHOR "Ser_UFL"
#define CRASHED_MAPS "addons/amxmodx/logs/Crashes/Crash.log"
#define CRASHED_MAPS_DIR "addons/amxmodx/logs/Crashes"
new g_ConsoleFile[16]
new bool:g_LoadingMap
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_forward(FM_ServerDeactivate, "Deactivate_Server")
is_linux_server() ? formatex(g_ConsoleFile, charsmax(g_ConsoleFile), "qconsole.log") : formatex(g_ConsoleFile, charsmax(g_ConsoleFile), "../qconsole.log")
new Time[32], this_map[32], this_map_log[64], Logs_all[64], Crash_file[64]
get_time("%d.%m.%Y / %X", Time, charsmax(Time))
get_mapname(this_map, charsmax(this_map))
formatex(Logs_all, charsmax(Logs_all), "Start: %s | %s", Time, this_map)
formatex(this_map_log, charsmax(this_map_log), "%s/%s.txt", CRASHED_MAPS_DIR, this_map)
new CrashDir = open_dir(CRASHED_MAPS_DIR, Crash_file, charsmax(Crash_file))
if (!CrashDir)
return
do
{
if (containi(Crash_file, ".txt") != -1)
{
new i_LineLen, Crashed_map_file[64], s_Line[64], Logs_all_crashes[96]
formatex(Crashed_map_file, charsmax(Crashed_map_file), "%s/%s", CRASHED_MAPS_DIR, Crash_file)
read_file(Crashed_map_file, 0, s_Line, charsmax(s_Line), i_LineLen)
formatex(Logs_all_crashes, charsmax(Logs_all_crashes), "%s | Deactivate: %s", s_Line, Time)
write_file(CRASHED_MAPS, Logs_all_crashes)
delete_file(Crash_file)
}
}
while (next_file(CrashDir, Crash_file, charsmax(Crash_file)))
close_dir(CrashDir)
write_file(this_map_log, Logs_all)
g_LoadingMap = true
set_task(1.0, "Fatal_Error")
}
public Deactivate_Server()
{
new map_deactivate[64]
get_mapname(map_deactivate, charsmax(map_deactivate))
format(map_deactivate, charsmax(map_deactivate), "%s/%s.txt", CRASHED_MAPS_DIR, map_deactivate)
delete_file(map_deactivate)
server_cmd("log on")
//server_cmd("condebug")
server_exec()
}
public Fatal_Error()
{
server_cmd("condebug")
server_exec()
new i_LineLen, i_LineCount, s_Line[192]
while (read_file(g_ConsoleFile, i_LineCount++, s_Line, charsmax(s_Line), i_LineLen))
{
if (containi(s_Line, "FATAL ERROR") != -1)
{
g_LoadingMap = false
format(s_Line, charsmax(s_Line), "Произошла следующая ошибка: %s", s_Line)
write_file(CRASHED_MAPS, s_Line)
}
}
if (!g_LoadingMap)
set_task(0.1, "Loading_map")
else
delete_file(g_ConsoleFile)
}
public Loading_map()
{
new i_LineLen, i_LineCount, s_Line[192]
while (read_file(g_ConsoleFile, i_LineCount++, s_Line, charsmax(s_Line), i_LineLen))
{
if (containi(s_Line, "Loading map") != -1)
{
format(s_Line, charsmax(s_Line), "при загрузке карты: %s", s_Line)
write_file(CRASHED_MAPS, s_Line)
}
}
delete_file(g_ConsoleFile)
} bună
îți pui modelele -_-
Refă după model.
#include <amxmodx>
#include <fun>
#include <amxmisc>
#include <cstrike>
new plugin_on
enum Color
{
NORMAL = 1, // clients scr_concolor cvar color
GREEN, // Green Color
TEAM_COLOR, // Red, grey, blue
GREY, // grey
RED, // Red
BLUE, // Blue
}
new TeamName[][] =
{
"",
"TERRORIST",
"CT",
"SPECTATOR"
}
public plugin_init(){
register_plugin("ADMIN MODELS MENU", "1.1", "HQ # NiKe aka NiKe2000")
register_menucmd(register_menuid("ADMIN MODELS MENU"), 1023, "setoption")
plugin_on = register_cvar("amx_admodels", "1")
register_clcmd("say /adminmodels","admin_models",ADMIN_KICK)
register_clcmd("say_team /adminmodels","admin_models",ADMIN_KICK)
register_clcmd("say /admodels","admin_models",ADMIN_KICK)
}
public admin_models(id,level,cid)
{
if ( !get_pcvar_num(plugin_on) )
{
ColorChat(id, RED, "Admin Models Menu is currently disabled");
return PLUGIN_HANDLED;
}
if(!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED
chooseoption(id)
return PLUGIN_HANDLED
}
public chooseoption(id)
{
new menu[192]
new keys = MENU_KEY_0|MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5|MENU_KEY_9
format(menu, 191, "\yAlegeti Costumul^n^n\r1.\w Simen RedLevel^n\r2.\w Armored^n\r3.\w Predator^n\r4.\w Ice Predator^n\r5.\w WeedMan^n\r9.\w Reset Admin Model^n^n\r0.\w Exit")
show_menu(id, keys, menu)
return PLUGIN_CONTINUE
}
public setoption(id, key, menu)
{
if(key == 0) {
new name[17]
get_user_name(id, name, 18)
cs_set_user_model(id, "admin_simen")
ColorChat(id, TEAM_COLOR, "^x04[ADMIN] ^x03%s^x01 has set Model ^x03Simen RedLevel", name)
return PLUGIN_CONTINUE
}
if(key == 1) {
new name[17]
get_user_name(id, name, 18)
cs_set_user_model(id, "armored_admin")
ColorChat(id, TEAM_COLOR, "^x04[ADMIN] ^x03%s^x01 has set Model ^x03Armored", name)
return PLUGIN_CONTINUE
}
if(key == 2) {
new name[17]
get_user_name(id, name, 18)
cs_set_user_model(id, "admin_predator")
ColorChat(id, TEAM_COLOR, "^x04[ADMIN] ^x03%s^x01 has set Model ^x03Predator", name)
return PLUGIN_CONTINUE
}
if(key == 3) {
new name[17]
get_user_name(id, name, 18)
cs_set_user_model(id, "predator1")
ColorChat(id, TEAM_COLOR, "^x04[ADMIN] ^x03%s^x01 has set Model ^x03Ice Predator", name)
return PLUGIN_CONTINUE
}
if(key == 4) {
new name[17]
get_user_name(id, name, 18)
cs_set_user_model(id, "predator2")
ColorChat(id, TEAM_COLOR, "^x04[ADMIN] ^x03%s^x01 has set Model ^x03WeedMan", name)
return PLUGIN_CONTINUE
}
else {
return PLUGIN_CONTINUE
}
return PLUGIN_HANDLED
}
public plugin_precache()
{
precache_model("models/player/admin_simen/admin_simen.mdl")
precache_model("models/player/armored_admin/armored_admin.mdl")
precache_model("models/player/admin_predator/admin_predator.mdl")
precache_model("models/player/predator1/predator1.mdl")
precache_model("models/player/predator2/predator2.mdl")
return PLUGIN_CONTINUE
}
ColorChat(id, Color:type, const msg[], {Float,Sql,Result,_}:...)
{
new message[256];
switch(type)
{
case NORMAL: // clients scr_concolor cvar color
{
message[0] = 0x01;
}
case GREEN: // Green
{
message[0] = 0x04;
}
default: // White, Red, Blue
{
message[0] = 0x03;
}
}
vformat(message[1], 251, msg, 4);
// Make sure message is not longer than 192 character. Will crash the server.
message[192] = '^0';
new team, ColorChange, index, MSG_Type;
if(id)
{
MSG_Type = MSG_ONE;
index = id;
} else {
index = FindPlayer();
MSG_Type = MSG_ALL;
}
team = get_user_team(index);
ColorChange = ColorSelection(index, MSG_Type, type);
ShowColorMessage(index, MSG_Type, message);
if(ColorChange)
{
Team_Info(index, MSG_Type, TeamName[team]);
}
}
ShowColorMessage(id, type, message[])
{
static bool:saytext_used;
static get_user_msgid_saytext;
if(!saytext_used)
{
get_user_msgid_saytext = get_user_msgid("SayText");
saytext_used = true;
}
message_begin(type, get_user_msgid_saytext, _, id);
write_byte(id)
write_string(message);
message_end();
}
Team_Info(id, type, team[])
{
static bool:teaminfo_used;
static get_user_msgid_teaminfo;
if(!teaminfo_used)
{
get_user_msgid_teaminfo = get_user_msgid("TeamInfo");
teaminfo_used = true;
}
message_begin(type, get_user_msgid_teaminfo, _, id);
write_byte(id);
write_string(team);
message_end();
return 1;
}
ColorSelection(index, type, Color:Type)
{
switch(Type)
{
case RED:
{
return Team_Info(index, type, TeamName[1]);
}
case BLUE:
{
return Team_Info(index, type, TeamName[2]);
}
case GREY:
{
return Team_Info(index, type, TeamName[0]);
}
}
return 0;
}
FindPlayer()
{
new i = -1;
while(i <= get_maxplayers())
{
if(is_user_connected(++i))
return i;
}
return -1;
} edit: gata
Încă caut!
Redeschis