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

Witam plugin sie nie chce skompilowa


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

#1 Sector

    Nowy

  • Użytkownik

Reputacja: -4
Nowy

  • Postów:6
  • Imię:David
  • Lokalizacja:Częstochowa
Offline

Napisano 19.06.2012 18:40

Witam mam amxx tego plugina jest to vip na paintball mod. lecz vip nie ma ammo mógłby ktoś poprawić kod ?

Nie chce się komplilować
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <hamsandwich>

#define PLUGIN "PaintBall VIP"
#define VERSION "1.0"

#define ADMIN_CHECK ADMIN_LEVEL_H

static const COLOR[] = "^x04" //green
static const CONTACT[] = ""

new maxplayers
new gmsgSayText

public plugin_init()
{
	    register_plugin(PLUGIN, VERSION, AUTHOR)
	    
	    register_clcmd("say /vip","ShowMotd")
	    register_clcmd("say /infovip","ShowMotd")
	    register_clcmd("say /info","ShowMotd")
	    register_clcmd("say /vipinfo","ShowMotd")
	    register_clcmd("say_team /vip","ShowMotd")
	    register_clcmd("say_team /infovip","ShowMotd")
	    register_clcmd("say_team /info","ShowMotd")
	    register_clcmd("say_team /vipinfo","ShowMotd")

	    RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1);
	    
	    maxplayers = get_maxplayers()
	    gmsgSayText = get_user_msgid("SayText")
	    register_clcmd("say", "handle_say")
	    register_clcmd("say_team", "handle_say")
	    register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
}

public fwHamPlayerSpawnPost(id)
{	   
	    if(is_user_alive(id) && get_user_flags(id) & ADMIN_LEVEL_H)
	    {
			    if(task_exists(id + 666))
					    remove_task(id + 666);
					    
			    set_task(2.0, "doGiveGrenades", id + 666);
	    }
}

public doGiveGrenades(task_id)
{
	    new id = task_id -= 666;
	    
	    if(id > get_maxplayers() || id < 1)
			    return PLUGIN_HANDLED;
			    
	    set_user_health(id, 200);
	    give_item(id, "weapon_smokegrenade");
	    give_item(id, "weapon_hegrenade");
	    give_item(id, "item_thighpack");
	    give_item(id, "weapon_p90");
	    give_item(id, "weapon_primammo");
	    give_item(id, "weapon_primammo");
	    
	    return PLUGIN_CONTINUE;
}
			    
public ShowMotd(id)
	    show_motd(id, "vip.txt")

public handle_say(id)
{
	    new said[192]
	    read_args(said,192)
	    if( ( containi(said, "who") != -1 && containi(said, "vips") != -1 ) || contain(said, "/vips") != -1 )
			    set_task(0.1,"print_adminlist",id)
	    return PLUGIN_CONTINUE
}

public print_adminlist(user)
{
	    new adminnames[33][32]
	    new message[256]
	    new contactinfo[256], contact[112]
	    new id, count, x, len
	    
	    for(id = 1 ; id <= maxplayers ; id++)
			    if(is_user_connected(id))
					    if(get_user_flags(id) & ADMIN_CHECK)
							    get_user_name(id, adminnames[count++], 31)

	    len = format(message, 255, "%s VIP'y online: ",COLOR)
	    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 ) {
							    print_message(user, message)
							    len = format(message, 255, "%s ",COLOR)
					    }
			    }
			    print_message(user, message)
	    }
	    else {
			    len += format(message[len], 255-len, "Brak VIP'ow online.")
			    print_message(user, message)
	    }
	    
	    get_cvar_string("amx_contactinfo", contact, 63)
	    if(contact[0])  {
			    format(contactinfo, 111, "%s Kontakt z H@ znajdziesz na forum www.cs-4u.pl %s", COLOR, contact)
			    print_message(user, contactinfo)
	    }
}

print_message(id, msg[])
{
	    message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
	    write_byte(id)
	    write_string(msg)
	    message_end()
}

  • +
  • -
  • 0

#2 Flk

    Czempion

  • Zbanowany

Reputacja: 307
Wszechpomocny

  • Postów:894
  • Steam:steam
  • Imię:Arkadiusz
  • Lokalizacja:Białystok
Offline

Napisano 19.06.2012 18:45

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <hamsandwich>

#define PLUGIN "PaintBall VIP"
#define VERSION "1.0"
#define AUTHOR "AMXX.PL"

#define ADMIN_CHECK ADMIN_LEVEL_H

static const COLOR[] = "^x04" //green
static const CONTACT[] = ""

new maxplayers
new gmsgSayText

public plugin_init()
{

register_plugin(PLUGIN, VERSION, AUTHOR)

register_clcmd("say /vip","ShowMotd")
register_clcmd("say /infovip","ShowMotd")
register_clcmd("say /info","ShowMotd")
register_clcmd("say /vipinfo","ShowMotd")
register_clcmd("say_team /vip","ShowMotd")
register_clcmd("say_team /infovip","ShowMotd")
register_clcmd("say_team /info","ShowMotd")
register_clcmd("say_team /vipinfo","ShowMotd")

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

maxplayers = get_maxplayers()
gmsgSayText = get_user_msgid("SayText")
register_clcmd("say", "handle_say")
register_clcmd("say_team", "handle_say")
register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
}

public fwHamPlayerSpawnPost(id)
{
if(is_user_alive(id) && get_user_flags(id) & ADMIN_LEVEL_H)
{
if(task_exists(id + 666))
remove_task(id + 666);

set_task(2.0, "doGiveGrenades", id + 666);
}
}

public doGiveGrenades(task_id)
{
new id = task_id -= 666;

if(id > get_maxplayers() || id < 1)
return PLUGIN_HANDLED;

set_user_health(id, 200);
give_item(id, "weapon_smokegrenade");
give_item(id, "weapon_hegrenade");
give_item(id, "item_thighpack");
give_item(id, "weapon_p90");
give_item(id, "weapon_primammo");
give_item(id, "weapon_primammo");

return PLUGIN_CONTINUE;
}

public ShowMotd(id)
show_motd(id, "vip.txt")

public handle_say(id)
{
new said[192]
read_args(said,192)
if( ( containi(said, "who") != -1 && containi(said, "vips") != -1 ) || contain(said, "/vips") != -1 )
set_task(0.1,"print_adminlist",id)
return PLUGIN_CONTINUE
}

public print_adminlist(user)
{
new adminnames[33][32]
new message[256]
new contactinfo[256], contact[112]
new id, count, x, len

for(id = 1 ; id <= maxplayers ; id++)
if(is_user_connected(id))
if(get_user_flags(id) & ADMIN_CHECK)
get_user_name(id, adminnames[count++], 31)

len = format(message, 255, "%s VIP'y online: ",COLOR)
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 ) {
print_message(user, message)
len = format(message, 255, "%s ",COLOR)
}
}
print_message(user, message)
}
else {
len += format(message[len], 255-len, "Brak VIP'ow online.")
print_message(user, message)
}

get_cvar_string("amx_contactinfo", contact, 63)
if(contact[0]) {
format(contactinfo, 111, "%s Kontakt z H@ znajdziesz na forum www.cs-4u.pl %s", COLOR, contact)
print_message(user, contactinfo)
}
}

print_message(id, msg[])
{
message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
write_byte(id)
write_string(msg)
message_end()
}

Najlepsza instalka Counter Strike 1.6 w sieci!!!

http://counter-strike.ct8.pl/


#3 Hiroshima

    Godlike

  • Przyjaciel

Reputacja: 1 327
Godlike

  • Postów:4 984
  • Steam:steam
  • Imię:Michał
  • Lokalizacja:Málaga
Offline

Napisano 19.06.2012 18:50

Automatyczna wiadomość


Ten temat został przeniesiony z forum

AMX Mod X > Problemy z pluginami

do

Scripting AMXX > Prośby o kompilacje pluginów / Problemy z kompilacją
  • +
  • -
  • 0

#4 Sector

    Nowy

  • Autor tematu
  • Użytkownik

Reputacja: -4
Nowy

  • Postów:6
  • Imię:David
  • Lokalizacja:Częstochowa
Offline

Napisano 19.06.2012 19:10

nadal nie działa

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

vip.sma(21) : error 017: undefined symbol "AUTHOR"
vip.sma(21 -- 23) : error 088: number of arguments does not match definition
vip.sma(126) : error 010: invalid function or declaration
vip.sma(128) : error 010: invalid function or declaration
vip.sma(134) : error 010: invalid function or declaration
vip.sma(138) : error 010: invalid function or declaration
vip.sma(141) : error 020: invalid symbol name ""
vip.sma(144) : error 010: invalid function or declaration
vip.sma(151) : error 010: invalid function or declaration
vip.sma(166) : error 021: symbol already defined: "COLOR"
vip.sma(167) : error 021: symbol already defined: "CONTACT"
vip.sma(169) : error 021: symbol already defined: "maxplayers"
vip.sma(170) : error 021: symbol already defined: "gmsgSayText"
vip.sma(173) : error 021: symbol already defined: "plugin_init"
vip.sma(196) : error 021: symbol already defined: "fwHamPlayerSpawnPost"
vip.sma(207) : error 021: symbol already defined: "doGiveGrenades"
vip.sma(225) : error 021: symbol already defined: "ShowMotd"
vip.sma(228) : error 021: symbol already defined: "handle_say"
vip.sma(237) : error 021: symbol already defined: "print_adminlist"
vip.sma(272) : error 021: symbol already defined: "print_message"

20 Errors.
Could not locate output file vip.amxx (compile failed).


  • +
  • -
  • 0

#5 Maniek974

    Wszechwiedzący

  • Power User

Reputacja: 352
Wszechpomocny

  • Postów:594
  • Steam:steam
  • Imię:Mariusz
  • Lokalizacja:Tomaszów Maz.
Offline

Napisano 19.06.2012 19:13

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <hamsandwich>

#define PLUGIN "PaintBall VIP"
#define VERSION "1.0"

#define ADMIN_CHECK ADMIN_LEVEL_H
#define AUTHOR "Administrator"

static const COLOR[] = "^x04" //green
static const CONTACT[] = ""

new maxplayers
new gmsgSayText

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)

register_clcmd("say /vip","ShowMotd")
register_clcmd("say /infovip","ShowMotd")
register_clcmd("say /info","ShowMotd")
register_clcmd("say /vipinfo","ShowMotd")
register_clcmd("say_team /vip","ShowMotd")
register_clcmd("say_team /infovip","ShowMotd")
register_clcmd("say_team /info","ShowMotd")
register_clcmd("say_team /vipinfo","ShowMotd")

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

maxplayers = get_maxplayers()
gmsgSayText = get_user_msgid("SayText")
register_clcmd("say", "handle_say")
register_clcmd("say_team", "handle_say")
register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
}

public fwHamPlayerSpawnPost(id)
{
if(is_user_alive(id) && get_user_flags(id) & ADMIN_LEVEL_H)
{
if(task_exists(id + 666))
remove_task(id + 666);

set_task(2.0, "doGiveGrenades", id + 666);
}
}

public doGiveGrenades(task_id)
{
new id = task_id -= 666;

if(id > get_maxplayers() || id < 1)
return PLUGIN_HANDLED;

set_user_health(id, 200);
give_item(id, "weapon_smokegrenade");
give_item(id, "weapon_hegrenade");
give_item(id, "item_thighpack");
give_item(id, "weapon_p90");
give_item(id, "weapon_primammo");
give_item(id, "weapon_primammo");

return PLUGIN_CONTINUE;
}

public ShowMotd(id)
show_motd(id, "vip.txt")

public handle_say(id)
{
new said[192]
read_args(said,192)
if( ( containi(said, "who") != -1 && containi(said, "vips") != -1 ) || contain(said, "/vips") != -1 )
set_task(0.1,"print_adminlist",id)
return PLUGIN_CONTINUE
}

public print_adminlist(user)
{
new adminnames[33][32]
new message[256]
new contactinfo[256], contact[112]
new id, count, x, len

for(id = 1 ; id <= maxplayers ; id++)
if(is_user_connected(id))
if(get_user_flags(id) & ADMIN_CHECK)
get_user_name(id, adminnames[count++], 31)

len = format(message, 255, "%s VIP'y online: ",COLOR)
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 ) {
print_message(user, message)
len = format(message, 255, "%s ",COLOR)
}
}
print_message(user, message)
}
else {
len += format(message[len], 255-len, "Brak VIP'ow online.")
print_message(user, message)
}

get_cvar_string("amx_contactinfo", contact, 63)
if(contact[0]) {
format(contactinfo, 111, "%s Kontakt z H@ znajdziesz na forum www.cs-4u.pl %s", COLOR, contact)
print_message(user, contactinfo)
}
}

print_message(id, msg[])
{
message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
write_byte(id)
write_string(msg)
message_end()
}


Mi się kompiluje i kod Arka też jest dobry

Użytkownik Maniek974 edytował ten post 19.06.2012 19:17

  • +
  • -
  • 0

#6 gost11

    Banned

  • Zbanowany

Reputacja: 2
Nowy

  • Postów:30
  • Imię:Patryk
  • Lokalizacja:Trójmiasto !!
Offline

Napisano 19.06.2012 22:15

Łap Sector Skompilowałem ci
Pozdro od GHOST'a

Załączone pliki


Jestem Nowy !!!





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

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