Mine sisusse
Otsi siit
  • Rohkem valikuid...
Otsi tulemusi mis sisaldab...
Otsi tulemusi...

Vipmenu tegemisel oleks abi vaja

Soovitatud postitused

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")

}

Jaga seda postitust


Postituse link
Share on other sites
Külaline misterx

Tee globaalne muutuja, kus iga kasutaja kohta on tõeväärtusega kirje. Iga kord, kui keegi VIP-menüüst midagi võtab, kirjutad sinna tõde, raundi algul paned tõe asemele vale. Kui kasutajal on väärtus tõde, siis ära lase tal VIP-menüüd kasutada.

Jaga seda postitust


Postituse link
Share on other sites
Külaline misterx

Katsetanud pole, eks sa proovi.

#include 
#include 
#include 
#include 
#include 

#define PLUGIN "Vipmenu"
#define VERSION "1.1"
#define AUTHOR "F!reFox"

new bool:vipUsed[33];
public plugin_init() {
   register_plugin(PLUGIN, VERSION, AUTHOR);
   register_clcmd("say /vipmenu", "CmdVip");
   register_clcmd("say_team /vipmenu", "CmdVip");
   set_task(50.0, "Advertise");
   RegisterHam(Ham_Spawn, "player", "player_spawn", 1);
}
public player_spawn(id) {
   vipUsed[id]=false;
}
public client_connect(id) {
   vipUsed[id]=false;
}
public CmdVip(id) {
   if(get_user_flags(id) & ADMIN_CFG) {
       if(vipUsed[id]) {
           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]^4VIP^3 menüüd saab kasutada vaid korra raundi jooksul!");
       }
   } else {
       ColorChat(id, GREY, "[^4VIP^3]Sa pead olema ^4VIP^3 et siseneda!");
   }
   return PLUGIN_HANDLED;
}
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);
       break;
       case 2: 
           GiveGravity(id);
       break;
       case 3: 
           GiveInvis(id);
       break;
       case 4: 
           GiveSpeed(id);
       break;
   }
   vipUsed[id]=true;
   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!");
   }
   return PLUGIN_HANDLED;
}

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() {
   ColorChat(0, GREY, "Sellel serveril on ^4VIP^3 Menu. Looja: ^4F!reFox^3");
}

Jaga seda postitust


Postituse link
Share on other sites
Külaline misterx

Mul endal kompilaator hetkel ei tööta, seega üle kontrollida ei saa. Proovi nii:

#include 
#include 
#include 
#include 
#include 
#include 

#define PLUGIN "Vipmenu"
#define VERSION "1.1"
#define AUTHOR "F!reFox"

new bool:vipUsed[33];
public plugin_init() {
   register_plugin(PLUGIN, VERSION, AUTHOR);
   register_clcmd("say /vipmenu", "CmdVip");
   register_clcmd("say_team /vipmenu", "CmdVip");
   set_task(50.0, "Advertise");
   RegisterHam(Ham_Spawn, "player", "player_spawn", 1);
}
public player_spawn(id) {
   vipUsed[id]=false;
}
public client_connect(id) {
   vipUsed[id]=false;
}
public CmdVip(id) {
   if(get_user_flags(id) & ADMIN_CFG) {
       if(vipUsed[id]) {
           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]^4VIP^3 menüüd saab kasutada vaid korra raundi jooksul!");
       }
   } else {
       ColorChat(id, GREY, "[^4VIP^3]Sa pead olema ^4VIP^3 et siseneda!");
   }
   return PLUGIN_HANDLED;
}
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);
       break;
       case 2: 
           GiveGravity(id);
       break;
       case 3: 
           GiveInvis(id);
       break;
       case 4: 
           GiveSpeed(id);
       break;
   }
   vipUsed[id]=true;
   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!");
   }
   return PLUGIN_HANDLED;
}

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() {
   ColorChat(0, GREY, "Sellel serveril on ^4VIP^3 Menu. Looja: ^4F!reFox^3");
}

Jaga seda postitust


Postituse link
Share on other sites
Külaline misterx

Sain kompilaatori tööle ja parandasin vead ära:

#include 
#include 
#include 
#include 
#include 
#include 

#define PLUGIN "Vipmenu"
#define VERSION "1.1"
#define AUTHOR "F!reFox"

new bool:vipUsed[33];
public plugin_init() {
   register_plugin(PLUGIN, VERSION, AUTHOR);
   register_clcmd("say /vipmenu", "CmdVip");
   register_clcmd("say_team /vipmenu", "CmdVip");
   set_task(50.0, "Advertise");
   RegisterHam(Ham_Spawn, "player", "player_spawn", 1);
}
public player_spawn(id) {
   vipUsed[id]=false;
}
public client_connect(id) {
   vipUsed[id]=false;
}
public CmdVip(id) {
   if(get_user_flags(id) & ADMIN_CFG) {
       if(vipUsed[id]) {
           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]^4VIP^3 menüüd saab kasutada vaid korra raundi jooksul!");
       }
   } else {
       ColorChat(id, GREY, "[^4VIP^3]Sa pead olema ^4VIP^3 et siseneda!");
   }
   return PLUGIN_HANDLED;
}
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);
       }
   }
   vipUsed[id]=true;
   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!");
   }
   return PLUGIN_HANDLED;
}

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() {
   ColorChat(0, GREY, "Sellel serveril on ^4VIP^3 Menu. Looja: ^4F!reFox^3");
}

Jaga seda postitust


Postituse link
Share on other sites
SUPERVIP

Proovi:

#include 
#include 
#include 
#include 
#include 
#include 

#define PLUGIN "Vipmenu"
#define VERSION "1.1"
#define AUTHOR "F!reFox"

new bool:vipUsed[33];
public plugin_init() {
   register_plugin(PLUGIN, VERSION, AUTHOR);
   register_clcmd("say /vipmenu", "CmdVip");
   register_clcmd("say_team /vipmenu", "CmdVip");
   set_task(50.0, "Advertise");
   RegisterHam(Ham_Spawn, "player", "player_spawn", 1);
}
public player_spawn(id) {
   vipUsed[id]=false;
}
public client_connect(id) {
   vipUsed[id]=false;
}
public CmdVip(id) {
   if(get_user_flags(id) & ADMIN_CFG) {
       if(!vipUsed[id]) {
           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]^4VIP^3 menüüd saab kasutada vaid korra raundi jooksul!");
       }
   } else {
       ColorChat(id, GREY, "[^4VIP^3]Sa pead olema ^4VIP^3 et siseneda!");
   }
   return PLUGIN_HANDLED;
}
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);
       }
   }
   vipUsed[id]=true;
   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!");
   }
   return PLUGIN_HANDLED;
}

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() {
   ColorChat(0, GREY, "Sellel serveril on ^4VIP^3 Menu. Looja: ^4F!reFox^3");
}  


ᕙ༼ຈل͜ຈ༽ᕗ flex your dongers ᕙ༼ຈل͜ຈ༽ᕗ

Jaga seda postitust


Postituse link
Share on other sites

Kommentaari lisamiseks loo konto või logi sisse

Kommenteerimiseks peate olema liige

Loo konto

Liituge meie kommuuni uue kontoga. See on lihtne!

Loo uus konto

Logi sisse

On juba konto? Logi sisse siit.

Logi sisse nüüd

×
×
  • Loo uus...

Oluline informatsioon

Selle veebisaidi paremaks muutmiseks oleme teie seadmesse paigutanud küpsised . Võite kohandada oma küpsiste seadeid , vastasel juhul eeldame, et te olete küpsiste kasutamisega nõus kui jätkate veebisaidil sirvimist.. Palun lugege läbi Kasutustingimused ja Privaatsuspoliitika.