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

Nie działa vip


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

#1 Vanilla

    Zaawansowany

  • Użytkownik

Reputacja: 1
Nowy

  • Postów:90
Offline

Napisano 30.01.2021 17:15

Cześć mam problem, gdy dodaje flagę dla gracza, VIP nie działa, flaga którą dodaje to S, czy wszystko w pluginie jest poprawne?

#include <amxmodx>
#include <colorchat>
#include <cstrike>
#include <fakemeta>
#include <fun>
#include <hamsandwich>

#define DMG_HE (1<<24)
#define IsPlayer(%1) (1<=%1<=maxPlayers)

forward amxbans_admin_connect(id);

new Array:g_Array, CsArmorType:armortype, bool:g_Vip[33], g_Hudmsg, ioid,
maxPlayers, skoki[33];

new const g_Langcmd[][]={"say /mafiozo","say_team /mafiozo","say /mafiozi","say_team /mafiozi"};
new const g_Prefix[] = "Chat Mafioza";

public plugin_init(){
	register_plugin("VIP Ultimate", "12.3.0.2", "benio101 & speedkill");
	RegisterHam(Ham_Spawn, "player", "SpawnedEventPre", 1);
	register_forward(FM_CmdStart, "CmdStartPre");
	RegisterHam(Ham_TakeDamage, "player", "takeDamage", 0);
	register_event("DeathMsg", "DeathMsg", "a");
	register_message(get_user_msgid("ScoreAttrib"), "VipStatus");
	g_Array=ArrayCreate(64,32);
	for(new i;i<sizeof g_Langcmd;i++){
		register_clcmd(g_Langcmd[i], "ShowVips");
	}
	g_Hudmsg=CreateHudSyncObj();
	register_event("Damage", "damage", "b", "2!0", "3=0", "4!0");
	register_clcmd("say_team", "VipChat");
	register_message(get_user_msgid("SayText"),"handleSayText");
}
public client_authorized(id){
	if(get_user_flags(id) & 262144 == 262144){
		client_authorized_vip(id);
	}
}
public client_authorized_vip(id){
	g_Vip[id]=true;
	new g_Name[64];
	get_user_name(id,g_Name,charsmax(g_Name));
	
	new g_Size = ArraySize(g_Array);
	new szName[64];
	
	for(new i = 0; i < g_Size; i++){
		ArrayGetString(g_Array, i, szName, charsmax(szName));
		
		if(equal(g_Name, szName)){
			return 0;
		}
	}
	ArrayPushString(g_Array,g_Name);
	set_hudmessage(24, 190, 220, 0.25, 0.2, 0, 6.0, 6.0);
	ShowSyncHudMsg(0, g_Hudmsg, "Mafiozo [%s] wchodzi na serwer!",g_Name);
	
	return PLUGIN_CONTINUE;
}
public client_disconnect(id){
	if(g_Vip[id]){
		client_disconnect_vip(id);
	}
}
public client_disconnect_vip(id){
	g_Vip[id]=false;
	new Name[64];
	get_user_name(id,Name,charsmax(Name));
	
	new g_Size = ArraySize(g_Array);
	new g_Name[64];
	
	for(new i = 0; i < g_Size; i++){
		ArrayGetString(g_Array, i, g_Name, charsmax(g_Name));
		
		if(equal(g_Name,Name)){
			ArrayDeleteItem(g_Array,i);
			break;
		}
	}
}
public SpawnedEventPre(id){
	if(g_Vip[id]){
		if(is_user_alive(id)){
			SpawnedEventPreVip(id);
		}
	}
}
public SpawnedEventPreVip(id){
	set_user_gravity(id, 600.0/800.0);
	skoki[id]=2;
	set_user_health(id, get_user_health(id)+80);
	cs_set_user_armor(id, min(cs_get_user_armor(id,armortype)+100, 300), armortype);
	new sgnum=(user_has_weapon(id,CSW_SMOKEGRENADE)?cs_get_user_bpammo(id,CSW_SMOKEGRENADE):0);
	give_item(id, "weapon_smokegrenade");
	++sgnum;
	cs_set_user_nvg(id);
	new g_Model[64];
	formatex(g_Model,charsmax(g_Model),"%s",get_user_team(id) == 1 ? "jailbreak_mafiozot" : "jailbreak_mafiozoc");
	cs_set_user_model(id,g_Model);
	if(get_user_team(id)==2){
		set_user_rendering(id, kRenderFxGlowShell, 0, 255, 0, kRenderNormal, 25);
	}
}
public CmdStartPre(id, uc_handle){
	if(g_Vip[id]){
		if(is_user_alive(id)){
			CmdStartPreVip(id, uc_handle);
		}
	}
}
public CmdStartPreVip(id, uc_handle){
	new flags = pev(id, pev_flags);
	if((get_uc(uc_handle, UC_Buttons) & IN_JUMP) && !(flags & FL_ONGROUND) && !(pev(id, pev_oldbuttons) & IN_JUMP) && skoki[id]>0){
		--skoki[id];
		new Float:velocity[3];
		pev(id, pev_velocity,velocity);
		velocity[2] = random_float(265.0,285.0);
		set_pev(id,pev_velocity,velocity);
	} else if(flags & FL_ONGROUND && skoki[id]!=-1){
		skoki[id] = 2;
	}
}
public plugin_cfg(){
	maxPlayers=get_maxplayers();
}
public takeDamage(this, idinflictor, idattacker, Float:damage, damagebits){
	if(((IsPlayer(idattacker) && is_user_connected(idattacker) && g_Vip[idattacker] && (ioid=idattacker)) ||
	(ioid=pev(idinflictor, pev_owner) && IsPlayer(ioid) && is_user_connected(ioid) && g_Vip[ioid]))){
		damage*=(100+10)/100;
		if(damagebits & DMG_HE){
			damage*=(100+10)/100;
		}
	}
}
public DeathMsg(){
	new killer=read_data(1);
	new victim=read_data(2);
	
	if(is_user_alive(killer) && g_Vip[killer] && get_user_team(killer) != get_user_team(victim)){
		DeathMsgVip(killer,victim,read_data(3));
	}
}
public DeathMsgVip(kid,vid,hs){
	set_user_health(kid, min(get_user_health(kid)+(hs?15:10),130));
}
public VipStatus(){
	new id=get_msg_arg_int(1);
	if(is_user_alive(id) && g_Vip[id]){
		set_msg_arg_int(2, ARG_BYTE, get_msg_arg_int(2)|4);
	}
}
public ShowVips(id){
	new g_Name[64],g_Message[192];
	
	new g_Size=ArraySize(g_Array);
	
	for(new i = 0; i < g_Size; i++){
		ArrayGetString(g_Array, i, g_Name, charsmax(g_Name));
		
		add(g_Message, charsmax(g_Message), g_Name);
		
		if(i == g_Size - 1){
			add(g_Message, charsmax(g_Message), ".");
		}
		else{
			add(g_Message, charsmax(g_Message), ", ");
		}
	}
	ColorChat(id,RED,"[JailBreak Mod]^x01 Mafiozo na serwerze: [^x04%s^x01]", g_Message);
	return PLUGIN_CONTINUE;
}
public client_infochanged(id){
	if(g_Vip[id]){
		new szName[64];
		get_user_info(id,"name",szName,charsmax(szName));
		
		new Name[64];
		get_user_name(id,Name,charsmax(Name));
		
		if(!equal(szName,Name)){
			ArrayPushString(g_Array,szName);
			
			new g_Size=ArraySize(g_Array);
			new g_Name[64];
			for(new i = 0; i < g_Size; i++){
				ArrayGetString(g_Array, i, g_Name, charsmax(g_Name));
				
				if(equal(g_Name,Name)){
					ArrayDeleteItem(g_Array,i);
					break;
				}
			}
		}
	}
}
public plugin_end(){
	ArrayDestroy(g_Array);
}
public damage(id){
	new attacker=get_user_attacker(id);
	new damage=read_data(2);
	
	if(g_Vip[id]){
		set_hudmessage(255, 0, 0, 0.45, 0.50, 2, 0.1, 4.0, 0.1, 0.1, -1);
		ShowSyncHudMsg(id, g_Hudmsg, "%i^n", damage);
	}
	if(is_user_connected(attacker) && g_Vip[attacker]){
		set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, -1);
		ShowSyncHudMsg(attacker, g_Hudmsg, "%i^n", damage);
	}
}
public VipChat(id){
	if(g_Vip[id]){
		new g_Msg[256],
		g_Text[256];
		
		read_args(g_Msg,charsmax(g_Msg));
		remove_quotes(g_Msg);
		
		if(g_Msg[0] == '#' && g_Msg[1]){
			new g_Name[64];
			get_user_name(id,g_Name,charsmax(g_Name));
			
			formatex(g_Text,charsmax(g_Text),"^x04[%s] ^x03%s : ^x01%s",g_Prefix, g_Name, g_Msg[1]);
			
			for(new i=1;i<33;i++){
				if(is_user_connected(i) && g_Vip[i])
				ColorChat(i, RED, "%s", g_Text);
			}
			return PLUGIN_HANDLED_MAIN;
		}
	}
	return PLUGIN_CONTINUE;
}
public handleSayText(msgId,msgDest,msgEnt){
	new id = get_msg_arg_int(1);
	
	if(is_user_connected(id) && g_Vip[id]){
		new szTmp[256],szTmp2[256];
		get_msg_arg_string(2,szTmp, charsmax(szTmp))
		
		new szPrefix[64] = "^x04[Mafiozo]";
		
		if(!equal(szTmp,"#Cstrike_Chat_All")){
			add(szTmp2,charsmax(szTmp2),szPrefix);
			add(szTmp2,charsmax(szTmp2)," ");
			add(szTmp2,charsmax(szTmp2),szTmp);
		}
		else{
			add(szTmp2,charsmax(szTmp2),szPrefix);
			add(szTmp2,charsmax(szTmp2),"^x03 %s1^x01 :  %s2");
		}
		set_msg_arg_string(2,szTmp2);
	}
	return PLUGIN_CONTINUE;
}
public plugin_precache(){
	precache_model("models/player/jailbreak_mafiozoc/jailbreak_mafiozoc.mdl");
	precache_model("models/player/jailbreak_mafiozot/jailbreak_mafiozot.mdl");
}
public amxbans_admin_connect(id){
	client_authorized(id);
}#include <amxmodx>
#include <colorchat>
#include <cstrike>
#include <fakemeta>
#include <fun>
#include <hamsandwich>

#define DMG_HE (1<<24)
#define IsPlayer(%1) (1<=%1<=maxPlayers)

forward amxbans_admin_connect(id);

new Array:g_Array, CsArmorType:armortype, bool:g_Vip[33], g_Hudmsg, ioid,
maxPlayers, skoki[33];

new const g_Langcmd[][]={"say /mafiozo","say_team /mafiozo","say /mafiozi","say_team /mafiozi"};
new const g_Prefix[] = "Chat Mafioza";

public plugin_init(){
	register_plugin("VIP Ultimate", "12.3.0.2", "benio101 & speedkill");
	RegisterHam(Ham_Spawn, "player", "SpawnedEventPre", 1);
	register_forward(FM_CmdStart, "CmdStartPre");
	RegisterHam(Ham_TakeDamage, "player", "takeDamage", 0);
	register_event("DeathMsg", "DeathMsg", "a");
	register_message(get_user_msgid("ScoreAttrib"), "VipStatus");
	g_Array=ArrayCreate(64,32);
	for(new i;i<sizeof g_Langcmd;i++){
		register_clcmd(g_Langcmd[i], "ShowVips");
	}
	g_Hudmsg=CreateHudSyncObj();
	register_event("Damage", "damage", "b", "2!0", "3=0", "4!0");
	register_clcmd("say_team", "VipChat");
	register_message(get_user_msgid("SayText"),"handleSayText");
}
public client_authorized(id){
	if(get_user_flags(id) & 262144 == 262144){
		client_authorized_vip(id);
	}
}
public client_authorized_vip(id){
	g_Vip[id]=true;
	new g_Name[64];
	get_user_name(id,g_Name,charsmax(g_Name));
	
	new g_Size = ArraySize(g_Array);
	new szName[64];
	
	for(new i = 0; i < g_Size; i++){
		ArrayGetString(g_Array, i, szName, charsmax(szName));
		
		if(equal(g_Name, szName)){
			return 0;
		}
	}
	ArrayPushString(g_Array,g_Name);
	set_hudmessage(24, 190, 220, 0.25, 0.2, 0, 6.0, 6.0);
	ShowSyncHudMsg(0, g_Hudmsg, "Mafiozo [%s] wchodzi na serwer!",g_Name);
	
	return PLUGIN_CONTINUE;
}
public client_disconnect(id){
	if(g_Vip[id]){
		client_disconnect_vip(id);
	}
}
public client_disconnect_vip(id){
	g_Vip[id]=false;
	new Name[64];
	get_user_name(id,Name,charsmax(Name));
	
	new g_Size = ArraySize(g_Array);
	new g_Name[64];
	
	for(new i = 0; i < g_Size; i++){
		ArrayGetString(g_Array, i, g_Name, charsmax(g_Name));
		
		if(equal(g_Name,Name)){
			ArrayDeleteItem(g_Array,i);
			break;
		}
	}
}
public SpawnedEventPre(id){
	if(g_Vip[id]){
		if(is_user_alive(id)){
			SpawnedEventPreVip(id);
		}
	}
}
public SpawnedEventPreVip(id){
	set_user_gravity(id, 600.0/800.0);
	skoki[id]=2;
	set_user_health(id, get_user_health(id)+80);
	cs_set_user_armor(id, min(cs_get_user_armor(id,armortype)+100, 300), armortype);
	new sgnum=(user_has_weapon(id,CSW_SMOKEGRENADE)?cs_get_user_bpammo(id,CSW_SMOKEGRENADE):0);
	give_item(id, "weapon_smokegrenade");
	++sgnum;
	cs_set_user_nvg(id);
	new g_Model[64];
	formatex(g_Model,charsmax(g_Model),"%s",get_user_team(id) == 1 ? "jailbreak_mafiozot" : "jailbreak_mafiozoc");
	cs_set_user_model(id,g_Model);
	if(get_user_team(id)==2){
		set_user_rendering(id, kRenderFxGlowShell, 0, 255, 0, kRenderNormal, 25);
	}
}
public CmdStartPre(id, uc_handle){
	if(g_Vip[id]){
		if(is_user_alive(id)){
			CmdStartPreVip(id, uc_handle);
		}
	}
}
public CmdStartPreVip(id, uc_handle){
	new flags = pev(id, pev_flags);
	if((get_uc(uc_handle, UC_Buttons) & IN_JUMP) && !(flags & FL_ONGROUND) && !(pev(id, pev_oldbuttons) & IN_JUMP) && skoki[id]>0){
		--skoki[id];
		new Float:velocity[3];
		pev(id, pev_velocity,velocity);
		velocity[2] = random_float(265.0,285.0);
		set_pev(id,pev_velocity,velocity);
	} else if(flags & FL_ONGROUND && skoki[id]!=-1){
		skoki[id] = 2;
	}
}
public plugin_cfg(){
	maxPlayers=get_maxplayers();
}
public takeDamage(this, idinflictor, idattacker, Float:damage, damagebits){
	if(((IsPlayer(idattacker) && is_user_connected(idattacker) && g_Vip[idattacker] && (ioid=idattacker)) ||
	(ioid=pev(idinflictor, pev_owner) && IsPlayer(ioid) && is_user_connected(ioid) && g_Vip[ioid]))){
		damage*=(100+10)/100;
		if(damagebits & DMG_HE){
			damage*=(100+10)/100;
		}
	}
}
public DeathMsg(){
	new killer=read_data(1);
	new victim=read_data(2);
	
	if(is_user_alive(killer) && g_Vip[killer] && get_user_team(killer) != get_user_team(victim)){
		DeathMsgVip(killer,victim,read_data(3));
	}
}
public DeathMsgVip(kid,vid,hs){
	set_user_health(kid, min(get_user_health(kid)+(hs?15:10),130));
}
public VipStatus(){
	new id=get_msg_arg_int(1);
	if(is_user_alive(id) && g_Vip[id]){
		set_msg_arg_int(2, ARG_BYTE, get_msg_arg_int(2)|4);
	}
}
public ShowVips(id){
	new g_Name[64],g_Message[192];
	
	new g_Size=ArraySize(g_Array);
	
	for(new i = 0; i < g_Size; i++){
		ArrayGetString(g_Array, i, g_Name, charsmax(g_Name));
		
		add(g_Message, charsmax(g_Message), g_Name);
		
		if(i == g_Size - 1){
			add(g_Message, charsmax(g_Message), ".");
		}
		else{
			add(g_Message, charsmax(g_Message), ", ");
		}
	}
	ColorChat(id,RED,"[JailBreak Mod]^x01 Mafiozo na serwerze: [^x04%s^x01]", g_Message);
	return PLUGIN_CONTINUE;
}
public client_infochanged(id){
	if(g_Vip[id]){
		new szName[64];
		get_user_info(id,"name",szName,charsmax(szName));
		
		new Name[64];
		get_user_name(id,Name,charsmax(Name));
		
		if(!equal(szName,Name)){
			ArrayPushString(g_Array,szName);
			
			new g_Size=ArraySize(g_Array);
			new g_Name[64];
			for(new i = 0; i < g_Size; i++){
				ArrayGetString(g_Array, i, g_Name, charsmax(g_Name));
				
				if(equal(g_Name,Name)){
					ArrayDeleteItem(g_Array,i);
					break;
				}
			}
		}
	}
}
public plugin_end(){
	ArrayDestroy(g_Array);
}
public damage(id){
	new attacker=get_user_attacker(id);
	new damage=read_data(2);
	
	if(g_Vip[id]){
		set_hudmessage(255, 0, 0, 0.45, 0.50, 2, 0.1, 4.0, 0.1, 0.1, -1);
		ShowSyncHudMsg(id, g_Hudmsg, "%i^n", damage);
	}
	if(is_user_connected(attacker) && g_Vip[attacker]){
		set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, -1);
		ShowSyncHudMsg(attacker, g_Hudmsg, "%i^n", damage);
	}
}
public VipChat(id){
	if(g_Vip[id]){
		new g_Msg[256],
		g_Text[256];
		
		read_args(g_Msg,charsmax(g_Msg));
		remove_quotes(g_Msg);
		
		if(g_Msg[0] == '#' && g_Msg[1]){
			new g_Name[64];
			get_user_name(id,g_Name,charsmax(g_Name));
			
			formatex(g_Text,charsmax(g_Text),"^x04[%s] ^x03%s : ^x01%s",g_Prefix, g_Name, g_Msg[1]);
			
			for(new i=1;i<33;i++){
				if(is_user_connected(i) && g_Vip[i])
				ColorChat(i, RED, "%s", g_Text);
			}
			return PLUGIN_HANDLED_MAIN;
		}
	}
	return PLUGIN_CONTINUE;
}
public handleSayText(msgId,msgDest,msgEnt){
	new id = get_msg_arg_int(1);
	
	if(is_user_connected(id) && g_Vip[id]){
		new szTmp[256],szTmp2[256];
		get_msg_arg_string(2,szTmp, charsmax(szTmp))
		
		new szPrefix[64] = "^x04[Mafiozo]";
		
		if(!equal(szTmp,"#Cstrike_Chat_All")){
			add(szTmp2,charsmax(szTmp2),szPrefix);
			add(szTmp2,charsmax(szTmp2)," ");
			add(szTmp2,charsmax(szTmp2),szTmp);
		}
		else{
			add(szTmp2,charsmax(szTmp2),szPrefix);
			add(szTmp2,charsmax(szTmp2),"^x03 %s1^x01 :  %s2");
		}
		set_msg_arg_string(2,szTmp2);
	}
	return PLUGIN_CONTINUE;
}
public plugin_precache(){
	precache_model("models/player/jailbreak_mafiozoc/jailbreak_mafiozoc.mdl");
	precache_model("models/player/jailbreak_mafiozot/jailbreak_mafiozot.mdl");
}
public amxbans_admin_connect(id){
	client_authorized(id);
}

  • +
  • -
  • 0

#2 Rivit

    Godlike

  • Support Team

Reputacja: 1 276
Godlike

  • Postów:4 292
Offline

Napisano 30.01.2021 17:54

Długie kody umieszczaj w załączniku. 

 

Jeśli plugin się kompiluje i wgrywasz go poprawnie to trzeba sprawdzić czy plugin się uruchomił.

Najprościej sprawdzić czy plugin działa komendą 'amxx plugins' w konsoli serwera i tam odszukanie pluginu vipa. 


  • +
  • -
  • 0

Na PW pomagam tylko odpłatnie. Przyjmuje zlecenia.

Wypociny: https://github.com/r...98/AMXX_plugins


#3 Vanilla

    Zaawansowany

  • Autor tematu
  • Użytkownik

Reputacja: 1
Nowy

  • Postów:90
Offline

Napisano 30.01.2021 19:37

Nie wyświetla się ten plugin w amxx plugins


  • +
  • -
  • 0

#4 Vanilla

    Zaawansowany

  • Autor tematu
  • Użytkownik

Reputacja: 1
Nowy

  • Postów:90
Offline

Napisano 30.01.2021 19:45

Okazalo sie ze nie bylo tego pluginu,ale gdy go kompiluje to wyswietla sie to:

AMX Mod X Compiler 1.8.3-dev+5154
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2013 AMX Mod X Team

jail_mafiozosvip.sma(61) : warning 233: symbol "client_disconnect" is marked as deprecated: Use client_disconnected() instead.
jail_mafiozosvip.sma(264) : error 088: number of arguments does not match definition

1 Error.
Could not locate output file jail_mafiozosvip.amxx (compile failed).



  • +
  • -
  • 0

#5 Rivit

    Godlike

  • Support Team

Reputacja: 1 276
Godlike

  • Postów:4 292
Offline

Napisano 30.01.2021 21:47


Nie wyświetla się ten plugin w amxx plugins

 

To mówi, że nie masz wgranego pluginu.

 


Okazalo sie ze nie bylo tego pluginu,ale gdy go kompiluje to wyswietla sie to:

Rozwiązanie tego problemu możesz znaleźć tutaj: https://amxx.pl/topi...atora-co-robić/oraz tutaj https://amxx.pl/topic/163055-naprawa-b%C5%82%C4%99du-load-error-17-invalid-file-format-or-version/


Rivit (30.01.2021 21:48):
https://amxx.pl/topi...mat-or-version/

Dodaje tu bo się nie sformatował link

  • +
  • -
  • 0

Na PW pomagam tylko odpłatnie. Przyjmuje zlecenia.

Wypociny: https://github.com/r...98/AMXX_plugins





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

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


Coinsy CSGOAtse Za SMS, PSC , Przelew - CoinSell.pl