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

Modele dla VIPa


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

#1 Slawekz

    Życzliwy

  • Użytkownik

Reputacja: 0
Nowy

  • Postów:24
  • Imię:Sławek
  • Lokalizacja:Łomia
Offline

Napisano 26.01.2012 09:09

Witam
Chciałem przerobić plugin, VIP tak aby osoby, które mają VIPa mialy inne modele.
Lecz modele się pobierają, lecz każdy VIP ma normalny model.
Oto sma Vipa
/*BETA*/
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>
#include <fakemeta_util>
#include <colorchat>

#define FLAGA ADMIN_LEVEL_G // flaga (jak zakomentujesz vip dla kazdego)
#define KASA 1200 // ile ma dawac kasy (zakomentowanie wylacza)
#define GRAWITACJA 1.0 // jaka ma byc grawitacja dla vipa (zakomentowanie wylacza)
#define SPEED 1.0 // jaki speed (zakomentowanie wylacza)
#define HP 100 //ile hp ma ustawic dla vipa (zakomentowanie wylacza)
#define INVI 255 //jaka widocznosc dla vipa 255=calkowita widocznosc 0=niewidzialnosc (zakomentowanie wylacza)
#define MAPY // jak zakomentujesz vip bedzie dzialal na wszystkich mapach
#define REKLAMA // czy ma pokazywac co 360 sec wiadomosc ze vip dostaje na poczatek wiele rzeczy wpisz /infovip itd...
#define VIPS // komenda /vipy lub /vips (online vipy)
#define INFO_VIP // motd ( komenda /infovip)
#define DEAGLE // deagle dla vipa
#define HE // he dla vipa
#define FLASH // flash dla vipa
#define SMOKE // smoke dla vipa
#define KAMIZELKA // daje kamizelke
#define MODEL //Modele dla vipa
#if defined VIPS
new maxplayers
#endif
///////////////MAPY NIE DZIALAJACE NA VIPIE/////////////////// PRZY #define MAPY
#if defined MAPY
new const maps[][] =
{
"aim_crazyjump",
"aim_map",
"1hp",
"35hp",
"awp_india",
"he_dodgeballs"
}
#endif
public plugin_init()
{
register_plugin("VIP", "1.5", "HubertTM");
#if defined INFO_VIP
register_clcmd("say /infovip", "MOTD", 0);
register_clcmd("say /vipinfo", "MOTD", 0);
#endif
#if defined VIPS
maxplayers = get_maxplayers()
register_clcmd("say /vips", "print_vips", 0);
register_clcmd("say /vipy", "print_vips", 0);
#endif
RegisterHam(Ham_Spawn, "player", "respawn", 1);
#if defined SPEED
register_event("CurWeapon", "CurWeapon", "be", "1=1")
#endif
#if defined REKLAMA
set_task(360.0, "VIPTEKST", 0,_,_,"b");
#endif
}
public respawn(id)
{
if (!is_user_alive(id))
return;
new mapname[32]
get_mapname(mapname, 31)

#if defined MAPY
new bool:bFind = false;
for(new i=0; i<sizeof maps; i++)
{
if(equali(mapname, maps[i])){
bFind = true;
break
}
}
if(bFind) return ;
else{
#endif


#if defined FLAGA
if(get_user_flags(id) & FLAGA){
#endif


#if defined DEAGLE
fm_give_item(id, "weapon_deagle");
fm_give_item(id, "ammo_50ae");
fm_give_item(id, "ammo_50ae");
fm_give_item(id, "ammo_50ae");
fm_give_item(id, "ammo_50ae");
#endif


#if defined HE
fm_give_item(id, "weapon_hegrenade");
#endif

#if defined FLASH
fm_give_item(id, "weapon_flashbang");
fm_give_item(id, "weapon_flashbang");
#endif


#if defined SMOKE
fm_give_item(id, "weapon_smokegrenade");
#endif


#if defined KAMIZELKA
fm_give_item(id, "item_assaultsuit")
#endif


#if defined KASA
new money = cs_get_user_money(id)
cs_set_user_money(id, money + KASA)

ColorChat(id, GREEN, "Jako gracz VIP otrzymujesz ^x01%d$ ^x04wiecej", KASA)
#endif



#if defined GRAWITACJA
fm_set_user_gravity(id, GRAWITACJA);
#endif

#if defined HP
fm_set_user_health(id, HP);
#endif

#if defined INVI
fm_set_user_rendering(id, kRenderFxNone, 0,0,0, kRenderTransAlpha, INVI)
#endif




#if defined MAPY
}
#endif

#if defined FLAGA
}
#endif
}
#if defined SPEED
public CurWeapon(id)
{
fm_set_user_maxspeed(id, SPEED)
}
#endif
#if defined INFO_VIP
public MOTD( id,level,cid ) {
if ( !cmd_access(id,level,cid,1) )
return PLUGIN_CONTINUE
show_motd( id,"vip.txt","Informacje VIP." );
return PLUGIN_CONTINUE
}
#endif
#if defined VIPS
public print_vips(user)
{
new adminnames[33][32]
new message[256]
new id, count, x, len
for(id = 1 ; id <= maxplayers ; id++)
if(is_user_connected(id))
if(get_user_flags(id) & FLAGA)
get_user_name(id, adminnames[count++], 31)
len = format(message, 255, "^x04 VIPY ONLINE: ")
if(count > 0) {
for(x = 0 ; x < count ; x++) {
len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"")
if(len > 96 ) {
ColorChat(user, GREEN, "%s", message);
len = format(message, 255, "^x04 ")
}
}
ColorChat(user, GREEN, "%s", message);
}
else {
len += format(message[len], 255-len, "Brak Vipow ONLINE")

ColorChat(user, GREEN, "%s", message);
}

}
#endif
#if defined REKLAMA
public VIPTEKST()
ColorChat(0, RED, "Vip dostaje wiele rzeczy na poczatek rundy, aby zobaczyc co wpisz /infovip");
#endif

#if defined MODEL
public SetPlayerModel(id)
{
if(cs_get_user_team(id) == CS_TEAM_T)
{
cs_set_user_model(id, "viptt");
}
else
{
cs_set_user_model(id, "vipct");
}
cs_set_user_model(id, "vip");
}
public plugin_precache(){
precache_model("models/player/viptt/viptt.mdl");
precache_model("models/player/vipct/vipct.mdl");
}
#endif

/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par }
*/

Sądzę, że problemem jest to, że
}
public plugin_precache(){
precache_model("models/player/viptt/viptt.mdl");
precache_model("models/player/vipct/vipct.mdl");
}

wpisałem w nieodpowiednim miejscu.
Proszę o jak najszybszą pomoc. Oczywiście nagradzam + :)

Już sobie poradziłem. Zastosowałem oddzielny plugin mający zmieniać modele.
  • +
  • -
  • 0

#2 BraciiK

    Profesjonalista

  • Zbanowany

Reputacja: 19
Początkujący

  • Postów:171
  • GG:
  • Imię:Maciek
  • Lokalizacja:Mchw
Offline

Napisano 26.01.2012 19:24

wiec modele zle wgrales :)

#3 Slawekz

    Życzliwy

  • Autor tematu
  • Użytkownik

Reputacja: 0
Nowy

  • Postów:24
  • Imię:Sławek
  • Lokalizacja:Łomia
Offline

Napisano 26.01.2012 22:00

Nie, modele dobrze wgrałem :) Tylko plugin jakoś ich nie chciał.
  • +
  • -
  • 0

#4 DarkGL

    Nie oddam ciasteczka !

  • Administrator

Reputacja: 6 555
Godlike

  • Postów:11 983
  • GG:
  • Steam:steam
  • Imię:Rafał
  • Lokalizacja:Warszawa
Offline

Napisano 26.01.2012 22:06

/*BETA*/

#include <amxmodx>

#include <amxmisc>

#include <cstrike>

#include <hamsandwich>

#include <fakemeta_util>

#include <colorchat>



#define FLAGA ADMIN_LEVEL_G // flaga (jak zakomentujesz vip dla kazdego)

#define KASA 1200                  // ile ma dawac kasy (zakomentowanie wylacza)

#define GRAWITACJA 1.0    // jaka ma byc grawitacja dla vipa (zakomentowanie wylacza)

#define SPEED 1.0                  // jaki speed (zakomentowanie wylacza)

#define HP 100                    //ile hp ma ustawic dla vipa (zakomentowanie wylacza)

#define INVI 255                    //jaka widocznosc dla vipa 255=calkowita widocznosc 0=niewidzialnosc (zakomentowanie wylacza)

#define MAPY       // jak zakomentujesz vip bedzie dzialal na wszystkich mapach

#define REKLAMA   // czy ma pokazywac co 360 sec wiadomosc ze vip dostaje na poczatek wiele rzeczy wpisz /infovip itd...

#define VIPS                                     // komenda /vipy lub /vips (online vipy)

#define INFO_VIP                                 // motd ( komenda /infovip)

#define DEAGLE   // deagle dla vipa

#define HE                         // he dla vipa

#define FLASH      // flash dla vipa

#define SMOKE     // smoke dla vipa

#define KAMIZELKA                 // daje kamizelke

#define MODEL                     //Modele dla vipa

#if defined VIPS

new maxplayers

#endif

///////////////MAPY NIE DZIALAJACE NA VIPIE/////////////////// PRZY #define MAPY

#if defined MAPY

new const maps[][] =

{

"aim_crazyjump",

"aim_map",

"1hp",

"35hp",

"awp_india",

"he_dodgeballs"

}

#endif

public plugin_init()

{

register_plugin("VIP", "1.5", "HubertTM");



#if defined INFO_VIP

register_clcmd("say /infovip", "MOTD", 0);

register_clcmd("say /vipinfo", "MOTD", 0);

#endif

#if defined VIPS

maxplayers = get_maxplayers()

register_clcmd("say /vips", "print_vips", 0);

register_clcmd("say /vipy", "print_vips", 0);

#endif

RegisterHam(Ham_Spawn, "player", "respawn", 1);

#if defined SPEED

register_event("CurWeapon", "CurWeapon", "be", "1=1")

#endif

#if defined REKLAMA

set_task(360.0, "VIPTEKST", 0,_,_,"b");

#endif

}

public respawn(id)

{

if (!is_user_alive(id))	return;



new mapname[32]

get_mapname(mapname, 31)



#if defined MAPY

new bool:bFind = false;

for(new i=0; i<sizeof maps; i++)

{

	if(equali(mapname, maps[i])){

		bFind = true;

		break

	}

}

if(bFind)                 return ;

else{

	#endif

	

	

	#if defined FLAGA

	if(get_user_flags(id) & FLAGA){

		#endif

		

		

		#if defined DEAGLE

		fm_give_item(id, "weapon_deagle");

		fm_give_item(id, "ammo_50ae");

		fm_give_item(id, "ammo_50ae");

		fm_give_item(id, "ammo_50ae");

		fm_give_item(id, "ammo_50ae"); 

		#endif

		

		

		#if defined HE

		fm_give_item(id, "weapon_hegrenade");

		#endif

		

		#if defined FLASH

		fm_give_item(id, "weapon_flashbang");

		fm_give_item(id, "weapon_flashbang");

		#endif

		

		

		#if defined SMOKE

		fm_give_item(id, "weapon_smokegrenade");

		#endif

		

		

		#if defined KAMIZELKA

		fm_give_item(id, "item_assaultsuit")

		#endif

		

		

		#if defined KASA

		new money = cs_get_user_money(id)

		cs_set_user_money(id, money + KASA)

		

		ColorChat(id, GREEN, "Jako gracz VIP otrzymujesz ^x01%d$ ^x04wiecej", KASA)

		#endif

		

		

		

		#if defined GRAWITACJA

		fm_set_user_gravity(id, GRAWITACJA);

		#endif

		

		#if defined HP

		fm_set_user_health(id, HP);

		#endif

		

		#if defined INVI

		fm_set_user_rendering(id, kRenderFxNone, 0,0,0, kRenderTransAlpha, INVI)

		#endif

		

		#if defined MODEL

		SetPlayerModel(id)

		#endif		

		

		

		

		#if defined MAPY

	}

	#endif

	

	#if defined FLAGA

}

#endif

}

#if defined SPEED

public CurWeapon(id)

{

fm_set_user_maxspeed(id, SPEED)

}

#endif

#if defined INFO_VIP

public MOTD( id,level,cid ) {

if ( !cmd_access(id,level,cid,1) )

	return PLUGIN_CONTINUE

	show_motd( id,"vip.txt","Informacje VIP." );

	return PLUGIN_CONTINUE

}

#endif

#if defined VIPS

public print_vips(user)

{

	new adminnames[33][32]

	new message[256]

	new id, count, x, len

	for(id = 1 ; id <= maxplayers ; id++)

		if(is_user_connected(id))

		if(get_user_flags(id) & FLAGA)

		get_user_name(id, adminnames[count++], 31)

	len = format(message, 255, "^x04 VIPY ONLINE: ")

	if(count > 0) {

		for(x = 0 ; x < count ; x++) {

			len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"")

			if(len > 96 ) {

				ColorChat(user, GREEN, "%s", message);

				len = format(message, 255, "^x04 ")

			}

		}

		ColorChat(user, GREEN, "%s", message);

	}

	else {

		len += format(message[len], 255-len, "Brak Vipow ONLINE")

		

		ColorChat(user, GREEN, "%s", message);

	}

	

}

#endif

#if defined REKLAMA

public VIPTEKST()

	ColorChat(0, RED, "Vip dostaje wiele rzeczy na poczatek rundy, aby zobaczyc co wpisz /infovip");

#endif



#if defined MODEL

public SetPlayerModel(id)

{

	if(cs_get_user_team(id) == CS_TEAM_T)

	{

		cs_set_user_model(id, "viptt");

	}

	else

	{

		cs_set_user_model(id, "vipct");

	}

	cs_set_user_model(id, "vip");

}

public plugin_precache(){         

	precache_model("models/player/viptt/viptt.mdl");

	precache_model("models/player/vipct/vipct.mdl");

}

#endif

  • +
  • -
  • 1




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

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