PDA

View Full Version : Cerere plugin



IonuTz95
21-05-2018, 04:04 AM
Plugin: numele pluginului: Plugin vip
Descriere: Salut , as dori un plugin vip care sa contina comanda /rsv , /rd (reset dead) cred ca stiti cu totii la ce ma refer , sa fiu sincer am incercat sa adaug eu acea comanda dar nu am reusit , iar meniul de arme sa fie disponibil dupa runda a 3 a , primele runde sa ofere armor/helm+deagle si setul de grenazi ( fara cea cu fum ) apoi meniul sa fie cel clasic ( daca nu ma insel )
M4A1 , deagle , armor+helm , grenazi.
Ak47 , deagle , armor+helm , grenazi.
Awp , deagle , armor+helm , grenazi.
Versiune: clasic
Autor: - // - (modific eu)
Flaguri: - // - (modific eu )

As fi recunoscator daca m-ar putea ajuta cineva.Multumesc

Asalt
22-05-2018, 05:37 PM
Here, interesanta chestia cu "Autor: - // - (modific eu)"
l-am facut in graba, ignora warnings, poti scapa usor de ele.



/* Plugin generated by AMXX-Studio */

#include < amxmodx >
#include < amxmisc >
#include < cstrike >
#include < fun >
#include < hamsandwich >

#define PLUGIN "VIP"
#define VERSION "1.0"
#define AUTHOR "Asalt"

new Menu, Round;


public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_logevent ( "RoundStart", 2, "1=Round_Start" );
RegisterHam ( Ham_Spawn, "player", "VIP_Spawn", 1 );
register_clcmd("say /rsv", "handle_rs");
register_clcmd("say /rd", "handle_rs");

}

public RoundStart (id)
Round += 1

public VIP_Spawn ( id )
{
if ( !is_user_connected ( id ) || !is_user_vip ( id ) )
return HAM_HANDLED;

give_item (id, "weapon_hegrenade" );
give_item (id, "weapon_flashbang" );
cs_set_user_bpammo (id, CSW_FLASHBANG, 2 );
give_item(id, "item_assaultsuit");
give_item(id, "item_thighpack");
give_item (id, "weapon_deagle" );
cs_set_user_bpammo (id, CSW_DEAGLE, 35 );

if ( Round >= 3 )
{
Menu = menu_create ( "MENIU VIP:", "GiveWeapons" );

menu_additem ( Menu, "M4A1 + DEAGLE", "1", 0 );
menu_additem ( Menu, "AK47 + DEAGLE", "2", 0 );
menu_additem ( Menu, "AWP + DEAGLE", "3", 0 );

menu_setprop ( Menu, MPROP_EXIT, MEXIT_ALL );

menu_display ( id, Menu, 0 );
}
return HAM_IGNORED;
}

public GiveWeapons ( id, Menu, item )
{
if ( !is_user_alive ( id ) || !is_user_vip ( id ) )
return PLUGIN_HANDLED;

if ( item == MENU_EXIT )
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:
{
strip_user_weapons (id);
give_item ( id, "weapon_m4a1" );
cs_set_user_bpammo ( id, CSW_M4A1, 90 );

give_item(id, "weapon_knife" );
give_item ( id, "weapon_hegrenade" );
give_item ( id, "weapon_flashbang" );
give_item ( id, "weapon_flashbang" );

give_item ( id, "weapon_deagle" );
cs_set_user_bpammo ( id, CSW_DEAGLE, 35 );

ColorChat ( id, "!n[!VIP!n] Ai primit !tM4A1 + DEAGLE + GRENDA !n!" );
}
case 2:
{
strip_user_weapons (id);
give_item ( id, "weapon_ak47" );
cs_set_user_bpammo ( id, CSW_AK47, 90 );

give_item(id, "weapon_knife" );
give_item ( id, "weapon_hegrenade" );
give_item ( id, "weapon_flashbang" );
give_item ( id, "weapon_flashbang" );

give_item ( id, "weapon_deagle" );
cs_set_user_bpammo ( id, CSW_DEAGLE, 35 );

ColorChat ( id, "!n[!gVIP!n] Ai primit !tAK47 + DEAGLE + GRENADE !n!" );
}
case 3:
{
strip_user_weapons (id);
give_item ( id, "weapon_awp" );
cs_set_user_bpammo ( id, CSW_AWP, 30 );

give_item(id, "weapon_knife" );
give_item ( id, "weapon_hegrenade" );
give_item ( id, "weapon_flashbang" );
give_item ( id, "weapon_flashbang" );

give_item ( id, "weapon_deagle" );
cs_set_user_bpammo ( id, CSW_DEAGLE, 35 );

ColorChat ( id, "!n[!gVIP!n] Ai primit !tAWP + DEAGLE + GRENADE !n!" );
}
}
menu_destroy ( Menu );
return PLUGIN_HANDLED;
}

stock bool: is_user_vip ( id )
{
if ( get_user_flags ( id ) & ADMIN_LEVEL_G )
return true;
return false;
}

public handle_rs(id){
if(cs_get_user_deaths(id) == 0)
client_print(id, print_chat, "Ai deja zero death`s.")
else {
cs_set_user_deaths(id, 0)
client_print(id, print_chat, "Ti-ai resetat death-urile.")

new name[32]
get_user_name(id, name, charsmax(name))
client_print(0, print_chat, "%s si-a resetat death-urile.", name)
}
}


stock ColorChat(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()
}
}
}
}

IonuTz95
23-05-2018, 09:18 PM
Multumesc frumos de ajutor.
Se poate da T/C.

~Wolf~
24-05-2018, 05:34 AM
:locked: