Tervist!
Üritan luua vipi pluginit, aga olen pluginite kohalt täiesti algaja.
Oleks vaja saada vipile:
Tasuta granad
Tasuta armor
15 hp killi kohta, 30 headshoti kohta
Näha damage, mis sa teed
Ja vipmenusse:
Gravy
Speed
255hp
Invincibility
Midagi ma suutsin kokku keerata, aga see on ainult vipmenu ja seda saab lõputult kasutada.
/* Plugin generated by AMXX-Studio */
#include
#include
#include
#include
#include
#define PLUGIN "Vipmenu"
#define VERSION "1.1"
#define AUTHOR "F!reFox"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /vipmenu", "CmdVip")
register_clcmd("say_team /vipmenu", "CmdVip")
set_task(50.0, "Advertise")
}
public CmdVip(id)
{
if(get_user_flags(id) & ADMIN_CFG)
{
if(is_user_alive(id))
{
new menu = menu_create("[\rPaintball\w] \yVIP:", "vip_handler")
menu_additem(menu, "Elud & Armor", "1", 0)
menu_additem(menu, "Gravity", "2", 0)
menu_additem(menu, "N2htaamtus", "3", 0)
menu_additem(menu, "Kiirus", "4", 0)
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
menu_display(id, menu, 0)
}
}
else ColorChat(id, GREY, "[^4VIP^3]Sa pead olema ^4VIP^3 et siseneda!")
}
public vip_handler(id, menu, item)
{
new data[6], szName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
new key = str_to_num(data);
switch(key)
{
case 1: GiveHealth(id)
case 2: GiveGravity(id)
case 3: GiveInvis(id)
case 4: GiveSpeed(id)
}
menu_destroy(menu);
return PLUGIN_HANDLED
}
public GiveHealth(id)
{
new iName[33]
get_user_name(id, iName, 31)
if(is_user_alive(id))
{
set_user_health(id, 255)
set_user_armor(id, 255)
ColorChat(0, GREY, "[^4VIP^3] ^4%s^3 kasutas ^4VIP^3 et saada ^4Elud & Armor^3!")
}
else ColorChat(id, GREY, "[^4VIP^3]Sa pead olema ^4elus^3 et kasutada seda!")
}
public GiveGravity(id)
{
new iName[33]
get_user_name(id, iName, 31)
if(is_user_alive(id))
{
set_user_gravity(id, 0.6)
ColorChat(0, GREY, "[^4VIP^3] ^4%s^3 kasutas ^4VIP^3 et saada ^4Gravity^3!")
}
else ColorChat(id, GREY, "[^4VIP^3]Sa pead olema ^4elus^3 et kasutada seda!")
}
public GiveInvis(id)
{
new iName[33]
get_user_name(id, iName, 31)
if(is_user_alive(id))
{
set_user_rendering(id,kRenderFxGlowShell,0,0, 0,kRenderTransAlpha, 80);
ColorChat(0, GREY, "[^4VIP^3] ^4%s^3 kasutas ^4VIP^3 et saada ^4N2htamatus^3!")
}
else ColorChat(id, GREY, "[^4VIP^3]Sa pead olema ^4elus^3 et kasutada seda!")
}
public GiveSpeed(id)
{
new iName[33]
get_user_name(id, iName, 31)
if(is_user_alive(id))
{
set_user_maxspeed(id, 450.0)
ColorChat(0, GREY, "[^4VIP^3] ^4%s^3 kasutas ^4VIP^3 et saada ^4KIIRUS^3!")
}
else ColorChat(id, GREY, "[^4VIP^3]Sa pead olema ^4elus^3 et kasutada seda!")
}
public Advertise(id)
{
ColorChat(id, GREY, "Sellel serveril on ^4VIP^3 Menu. Looja: ^4F!reFox^3")
}