Cerere modificare plugin VIP deathrun

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Post Reply
User avatar
JigSaw;xx
Membru, skill 0
Membru, skill 0
Posts: 14
Joined: 05 Dec 2019, 17:56
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Has thanked: 2 times

29 Dec 2019, 23:45

Plugin Cerut: Modificare Vip Deathrun
Descriere (adica ce face el mai exact):este un meniu care, contine : arme,viata,armura etc.
Serverul impune conditii strict HLDS/REHLDS?:Nu
Ai cautat pluginul?(daca da, precizeaza cum); Nu
Necesita mod special?: Deathrun

As vrea sa imi adaugati si mie vip in tab pentru ca acest plugin nu are asa ceva

Sursa:
| Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>

#pragma semicolon 1

#define PLUGIN "Deathrun VIP"
#define VERSION "0.2"
#define AUTHOR "JigSaw"

#define ACCES ADMIN_LEVEL_H // Aici schimbati accesul

new g_ScoreAttrib;
new cvar_speed, cvar_gravity, cvar_hp, cvar_ap;
new Has_Speed[33];
new Has_Chose [ 33 ];

public plugin_init() {

register_plugin(PLUGIN, VERSION, AUTHOR);

cvar_gravity = register_cvar("vip_gravity", "400");
cvar_speed = register_cvar("vip_speed", "1500");
cvar_hp = register_cvar("vip_hp", "1000");
cvar_hp = register_cvar("vip_ap", "100");

RegisterHam(Ham_Spawn, "player", "PlayerSpawm");

register_clcmd("say /vmenu", "drvip_menu");
register_clcmd("say_team /vmenu", "drvip_menu");
register_clcmd ("say /vip" , "wantvip" , -1);
register_clcmd ("say_team /vip" , "wantvip" , -1);
register_clcmd("say", "handle_say");
register_clcmd("say_team", "handle_say");

register_event( "CurWeapon", "CurWeapon", "be", "1=1" );
}

public CurWeapon( id )
{
if( Has_Speed[ id ] )
{
set_user_maxspeed( id, get_pcvar_float( cvar_speed ) );
}
}

public PlayerSpawm(id) {

new iPlayers [ 32 ];
new iNum;

get_players ( iPlayers, iNum );

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

if(!is_user_alive(id))
return 1;

if(get_user_flags(id) & ACCES)
{
new CsTeams:team = cs_get_user_team(id);
switch(team)
{
case CS_TEAM_T:
{

set_user_health(id, get_pcvar_num(cvar_hp));
set_user_armor(id, get_pcvar_num(cvar_ap));
set_user_scoreattrib(id, 4);
Has_Speed[id] = false;

}
case CS_TEAM_CT:
{
strip_user_weapons(id);
set_user_health(id, get_pcvar_num(cvar_hp));
set_user_armor(id, get_pcvar_num(cvar_ap));
give_item(id, "weapon_usp");
cs_set_user_bpammo(id, CSW_USP, 100);
give_item(id, "weapon_hegrenade");
give_item(id, "weapon_flashbang");
give_item(id, "weapon_flashbang");
give_item(id, "weapon_smokegrenade");
set_user_scoreattrib(id, 4);
Has_Speed[id] = false;
}
}
}
return 1;

}

public drvip_menu(id){

if ( Has_Chose [ id ] == 1 ) {
ColorChat( id, "^x01Ai folosit deja ^x04meniul ." );
}


if(get_user_team(id) == 1)
{
ColorChat(id, "^x01Doar^x04 CT^x01 pot folosi meniul");
return 1;
}

if(get_user_flags(id) & ACCES)
{
new menu = menu_create("\y---== [ \rVIP Menu \y] ==---", "drvip_handler");

menu_additem(menu, "\y[\w*\y] \rAk47 \w+ \rM4a1 \w+ \yDeagler", "1", 0);
menu_additem(menu, "\y[\w*\y] \rRifles \y(Arme Tari)", "2", 0);
menu_additem(menu, "\y[\w*\y] \rAparatoare \y(Shields)", "3", 0);
menu_additem(menu, "\y[\w*\y] \rViteza", "4", 0);
menu_additem(menu, "\y[\w*\y] \rGravitate", "5", 0);
menu_additem(menu, "\y[\w*\y] \rViata", "6", 0);

menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu, 0);
}
else
{
ColorChat(id, "^x01Doar^x04 VIP^x01 pot folosi meniul");
return 1;
}

return 1;
}

public drvip_handler(id, menu, item){

if( item == MENU_EXIT )
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}

new data[6], iName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);

new key = str_to_num(data);
switch(key)
{
case 1:
{
give_item(id, "weapon_ak47");
give_item(id, "weapon_m4a1");
give_item(id, "weapon_deagle");
cs_set_user_bpammo(id, CSW_AK47, 90);
cs_set_user_bpammo(id, CSW_M4A1, 90);
cs_set_user_bpammo(id, CSW_DEAGLE, 32);
ColorChat(id, "^x01Ai primit %i ^x04Ak47 + M4a1 + Deagle");
Has_Speed[id] = false;
Has_Chose[id] ++;
}
case 2:
{
give_item(id, "weapon_ak47");
cs_set_user_bpammo(id, CSW_AK47, 250);
give_item(id, "weapon_m4a1");
cs_set_user_bpammo(id, CSW_M4A1, 250);
give_item(id, "weapon_deagle");
cs_set_user_bpammo(id, CSW_DEAGLE, 250);
give_item(id, "weapon_famas");
cs_set_user_bpammo(id, CSW_FAMAS, 250);
give_item(id, "weapon_awp");
cs_set_user_bpammo(id, CSW_AWP, 250);
give_item(id, "weapon_mp5navy");
cs_set_user_bpammo(id, CSW_MP5NAVY, 250);
give_item(id, "weapon_ump45"); 
cs_set_user_bpammo(id, CSW_UMP45, 250);
give_item(id, "weapon_galil");
cs_set_user_bpammo(id, CSW_GALIL, 250);
give_item(id, "weapon_scout");
cs_set_user_bpammo(id, CSW_SCOUT, 250);
give_item(id, "weapon_aug");
cs_set_user_bpammo(id, CSW_AUG, 250);
give_item(id, "weapon_sg550");
cs_set_user_bpammo(id, CSW_SG550, 250 );
ColorChat(id, "^x01Ai primit %i ^x04Rifles.");
Has_Speed[id] = false;
Has_Chose[id] ++;
}
case 3:
{
give_item(id,"weapon_shield");
ColorChat(id, "^x01Ai primit %i ^x04Shield");
Has_Speed[id] = false;
Has_Chose[id] ++;
}
case 4:
{
set_user_maxspeed(id, get_pcvar_float(cvar_speed));
ColorChat(id, "^x01Ai primit %i ^x04Speed");
Has_Speed[id] = true;
Has_Chose[id] ++;
}
case 5:
{
set_user_gravity(id, get_pcvar_float(cvar_gravity) / 800);
ColorChat(id, "^x01Ai primit ^x04Gravity");
Has_Speed[id] = false;
Has_Chose[id] ++;
}
case 6:
{
set_user_health(id, get_user_health(id) + 500);
ColorChat(id, "^x01Ai primit ^x04Viata");
Has_Speed[id] = false;
Has_Chose[id] ++;
}      
}
menu_destroy(menu);
return PLUGIN_HANDLED;
}

public print_adminlist(user) {
new adminnames[33][32];
new message[256];
new id, count, x, len;

for(id = 1 ; id <= get_maxplayers() ; id++)
if(is_user_connected(id))
if(get_user_flags(id) & ACCES)
get_user_name(id, adminnames[count++], 31);

len = format(message, 255, "^x04 VIP ONLINE: ");
if(count > 0) {
for(x = 0 ; x < count ; x++) {
len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"");
if(len > 96) {
print_message(user, message);
len = format(message, 255, "^x04 ");
}
}
print_message(user, message);
}
else {
len += format(message[len], 255-len, "No VIP online.");
print_message(user, message);
}
}
print_message(id, msg[]) {
message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, id);
write_byte(id);
write_string(msg);
message_end();
}

public handle_say(id) {
new said[192];
read_args(said,192);
if(contain(said, "/vips") != -1)
set_task(0.1,"print_adminlist",id);
return PLUGIN_CONTINUE;
}

public wantvip(id) show_motd(id,"/addons/amxmodx/configs/vip.html");

stock set_user_scoreattrib(id, attrib = 0){
message_begin(MSG_BROADCAST, g_ScoreAttrib, _, 0);
write_byte(id);
write_byte(attrib);
message_end( );
}

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

replace_all(msg, 190, "^x04", "^4");
replace_all(msg, 190, "^x01", "^1");
replace_all(msg, 190, "^x03", "^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, get_user_msgid("SayText"), _, players);
write_byte(players);
write_string(msg);
message_end();
}
}
}
}
Last edited by L E V I N on 30 Dec 2019, 16:07, edited 1 time in total.
Reason: „ai făcut” acest plugin da nu știi să îi pui ceva?
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 12 guests