Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

Menu VIPWyświetla się menu broni od pierwszej zamiast od trzeciej rundy

menu vip od 3 rundy

  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
2 odpowiedzi w tym temacie

#1 stiVwoW

    Pomocny

  • Użytkownik

Reputacja: 0
Nowy

  • Postów:67
Offline

Napisano 23.10.2016 07:25

Witam, mam problem z vip, wyświetla się menu od pierwszej rundy, a powinno standardowo od trzeciej, próbowałem dodać według poradników, ale nie wychodziło mi. Proszę o pomoc.

 

/* Plugin generated by AMXX-Studio */
 
#include <amxmodx>
#include <amxmisc>
#include <HamSandwich>
#include <cstrike>
#include <fun>
#include <fakemeta_util>
 
#define PLUGIN "vipFORfuterko97"
#define VERSION "v1.0"
#define AUTHOR "[KRAKOW]MalyKolednicY"
 
new rounds = 0;
 
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Spawn, "player", "spawnvip", 0);
register_event("DeathMsg", "DeathMsg", "a");
register_event("HLTV", "startRound", "a", "1=0", "2=0");
register_logevent("GameCommencing", 2, "1=Game_Commencing");
register_message(get_user_msgid("ScoreAttrib"), "VipStatus");
}
public GameCommencing(){
rounds = 0;
}
public startRound(){
++rounds;
}
public DeathMsg(){
new killer = read_data(1);
new headshot = read_data(3);
 
if(get_user_flags(killer) & ADMIN_LEVEL_A){
if(is_user_alive(killer)){
set_user_health(killer, get_user_health(killer) + 15);
if(headshot == 1){
set_user_health(killer, get_user_health(killer) + 5);
}
}
}
}
public spawnvip(index){
if(get_user_flags(index) & ADMIN_LEVEL_A){
if(is_user_alive(index)){
menudlavipa(index);
}
}
}
public menudlavipa(index){
if(get_user_flags(index) & ADMIN_LEVEL_A){
new menuvip = menu_create("Menu VIP'a", "zaczepvip");
 
menu_additem(menuvip, "M4A1 + Deagle");
menu_additem(menuvip, "AK47 + Deagle");
menu_additem(menuvip, "AWP + Deagle");
 
menu_display(index, menuvip, 0);
return PLUGIN_HANDLED;
}
return PLUGIN_HANDLED;
}
public zaczepvip(index, menu, item){
fm_strip_user_gun(index, 0);
switch(item){
case 0:{
give_item(index, "weapon_hegrenade");
give_item(index, "weapon_flashbang");
give_item(index, "weapon_flashbang");
give_item(index, "weapon_smokegrenade");
give_item(index, "weapon_m4a1");
give_item(index, "weapon_deagle");
cs_set_user_bpammo(index, CSW_M4A1, 90);
cs_set_user_bpammo(index, CSW_DEAGLE, 35);
}
case 1:{
give_item(index, "weapon_hegrenade");
give_item(index, "weapon_flashbang");
give_item(index, "weapon_flashbang");
give_item(index, "weapon_smokegrenade");
give_item(index, "weapon_ak47");
give_item(index, "weapon_deagle");
cs_set_user_bpammo(index, CSW_AK47, 90);
cs_set_user_bpammo(index, CSW_DEAGLE, 35);
}
case 2:{
give_item(index, "weapon_hegrenade");
give_item(index, "weapon_flashbang");
give_item(index, "weapon_flashbang");
give_item(index, "weapon_smokegrenade");
give_item(index, "weapon_awp");
give_item(index, "weapon_deagle");
cs_set_user_bpammo(index, CSW_AWP, 30);
cs_set_user_bpammo(index, CSW_DEAGLE, 35);
}
}
menu_destroy(menu);
return PLUGIN_HANDLED;
}
 
public VipStatus(){
new id=get_msg_arg_int(1);
if(is_user_alive(id) && ADMIN_LEVEL_A){
set_msg_arg_int(2, ARG_BYTE, get_msg_arg_int(2)|4);
}
}

 

 


  • +
  • -
  • 0

#2 RomanHardcor

    Jestem Mistrzem :D

  • Użytkownik

Reputacja: 37
Życzliwy

  • Postów:289
  • GG:
  • Imię:Roman
  • Lokalizacja:Bełchatów
Offline

Napisano 23.10.2016 09:29

Spróbuj podmienić tym funkcję spawnvip

public spawnvip(index)
{
	if(get_user_flags(index) & ADMIN_LEVEL_A)
	{
		if(is_user_alive(index) && rounds >= 3)
		{
			menudlavipa(index);
		}
	}
}

A jak nie będzie trybić to spróbuj dodać w funkcji gdzie masz menu taki warunek.

if(round >= 3)
{
   [...] Tutaj kod menu
}

  • +
  • -
  • 0

Znajomosć -> PAWN | CSS | HTML 

 

 

Blantever.PL

 

Master Yoga to mój autorytet. 


#3 stiVwoW

    Pomocny

  • Autor tematu
  • Użytkownik

Reputacja: 0
Nowy

  • Postów:67
Offline

Napisano 23.10.2016 12:47

Zrobiłem tak jak Pan opisał, jestem wdzięczny. nie wiem czy mogę w tym temacie kolejny problem z vipem rozwiązać, mianowicie wszyscy go dostają gdy tylko włączę vipa, 


  • +
  • -
  • 0




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych