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

VIP pod PaintBall errory


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

#1 adis

    Życzliwy

  • Użytkownik

Reputacja: 9
Nowy

  • Postów:38
  • Lokalizacja:TRN
Offline

Napisano 13.08.2012 11:50

Witam . Mam problem z pluginem vip ;) Próbowałem zrobić VIP pod PaintBall'a ale chyba gów** z tego wyszło :) Przy kompilacji wyskakuje tak . Za zrobienie tego dam reputacje :)


vip.sma(39) : error 054: unmatched closing brace
vip.sma(45) : error 017: undefined symbol "FMRES_IGNORED"
vip.sma(47) : error 017: undefined symbol "get_uc"
vip.sma(48) : error 017: undefined symbol "pev"
vip.sma(49) : error 017: undefined symbol "pev"
vip.sma(50) : error 017: undefined symbol "IN_JUMP"
vip.sma(54) : error 017: undefined symbol "pev"
vip.sma(54) : warning 215: expression has no effect
vip.sma(54) : error 001: expected token: ";", but found ")"
vip.sma(54) : error 029: invalid expression, assumed zero
vip.sma(54) : fatal error 107: too many error messages on one line

Compilation aborted.
10 Errors.

A to sma. Pluginu




/* Plugin generated by AMXX-Studio */

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

#define PLUGIN "Paintball VIP"
#define VERSION "1.0"
#define AUTHOR "Adis"
#define VIP_LEVEL ADMIN_LEVEL_H


public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
set_task(5.0, "dodaj_hp", _, _, _, "b");
RegisterHam(Ham_Spawn, "player", "event_spawn", 1);
}
public event_spawn(id)
{
if(is_user_connected(id) && get_user_flags(id) & VIP_LEVEL)
{
give_item(id, "weapon_hegrenade");
set_user_health(id, 150);
}
}
public dodaj_hp()
{
for(new id = 1; id <= 32; id++)
{
if(is_user_connected(id) && get_user_flags(id) & VIP_LEVEL)
{
set_user_health(id, min(150, get_user_health(id) + 10))
}
}
}

}
public CmdStart(id, uc_handle)
{
static moze_skoczyc;

if(!is_user_alive(id) || !(get_user_flags(id)&ADMIN_LEVEL_H))
return FMRES_IGNORED;

new button = get_uc(uc_handle, UC_Buttons);
new oldbutton = pev(id, pev_oldbuttons);
new flags = pev(id, pev_flags);
if((button & IN_JUMP) && !(flags & FL_ONGROUND) && !(oldbutton & IN_JUMP) && moze_skoczyc & (1<<id))
{
moze_skoczyc &=  ~(1<<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){
moze_skoczyc |= (1<<id)
}

return FMRES_IGNORED;
}

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, "admin") != -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_LEVEL_H && !(get_user_flags(id) & ADMIN_IMMUNITY)) 
get_user_name(id, adminnames[count++], 31) 
}
}

len = format(message, 255, "%s VIP'y Dostepne: ",COLOR)
if(count > 0) 
{
for(x = 0 ; x < count ; x++) 
{
len += format(message[len], 255-len, "%s%s%s ", COLOR, adminnames[x], x < (count-1) ? "^x01, ":"")
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")
print_message(user, message)
}

get_cvar_string("sv_contact", contact, 63)
if(contact[0])  {
format(contactinfo, 111, "%s Kontakt z Adminem Adis GG 11319166-- %s", COLOR, contact)
print_message(user, contactinfo)
}
return PLUGIN_HANDLED;
}

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

  • +
  • -
  • 0

#2 MaxiKINGer

    Banned

  • Zbanowany

Reputacja: 35
Życzliwy

  • Postów:307
  • GG:
  • Imię:Mateusz
  • Lokalizacja:Kartuzy
Offline

Napisano 13.08.2012 16:58


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

#define PLUGIN "Paintball VIP"
#define VERSION "1.0"
#define AUTHOR "Adis"
#define VIP_LEVEL ADMIN_LEVEL_H

new gmsgSayText

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR);
    set_task(5.0, "dodaj_hp", _, _, _, "b");
    RegisterHam(Ham_Spawn, "player", "event_spawn", 1);
}
public event_spawn(id)
{
    if(is_user_connected(id) && get_user_flags(id) & VIP_LEVEL)
    {
        give_item(id, "weapon_hegrenade");
        set_user_health(id, 150);
    }
}
public dodaj_hp()
{
    for(new id = 1; id <= 32; id++)
    {
        if(is_user_connected(id) && get_user_flags(id) & VIP_LEVEL)
        {
            set_user_health(id, min(150, get_user_health(id) + 10))
        }
    }
}

public CmdStart(id, uc_handle)
{
static moze_skoczyc;

if(!is_user_alive(id) || !(get_user_flags(id)&ADMIN_LEVEL_H))
    return FMRES_IGNORED;

new button = get_uc(uc_handle, UC_Buttons);
new oldbutton = pev(id, pev_oldbuttons);
new flags = pev(id, pev_flags);
if((button & IN_JUMP) && !(flags & FL_ONGROUND) && !(oldbutton & IN_JUMP) && moze_skoczyc & (1<<id))
{
    moze_skoczyc &=  ~(1<<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){
    moze_skoczyc |= (1<<id)
}

return FMRES_IGNORED;
}

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, "admin") != -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

{
    if(is_user_connected(id))
    {
        if(get_user_flags(id) & ADMIN_LEVEL_H && !(get_user_flags(id) & ADMIN_IMMUNITY))
            get_user_name(id, adminnames[count++], 31)
    }
}

len = format(message, 255, "%s VIP'y Dostepne: ",GREEN)
if(count > 0)
{
    for(x = 0 ; x < count ; x++)
    {
        len += format(message[len], 255-len, "%s%s%s ", GREEN, adminnames[x], x < (count-1) ? "^x01, ":"")
        if(len > 96 ) {
            print_message(user, message)
            len = format(message, 255, "%s ",GREEN)
        }
    }
    print_message(user, message)
}
else {
    len += format(message[len], 255-len, "Brak Vip'ow")
    print_message(user, message)
}

get_cvar_string("sv_contact", contact, 63)
if(contact[0])  {
    format(contactinfo, 111, "%s Kontakt z Adminem Adis GG 11319166-- %s", GREEN, contact)
    print_message(user, contactinfo)
}
return PLUGIN_HANDLED;
}

print_message(id, msg[]) {
message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
write_byte(id)
write_string(msg)
message_end()
}
Skopilować to się skompiluje, ale widzę, że robisz zlepek pluginów i chcesz żeby od razu działało. :facepalm2:

Pomogłem? Postaw z łaski swojej plusa...
Wbijaj! www.Mocny-Trick.pl
Dołączona grafikaDołączona grafika
Dołączona grafikaDołączona grafika

Dołączona grafika


#3 Kawon

    Godlike

  • Przyjaciel

Reputacja: 887
Czempion

  • Postów:5 165
  • Steam:steam
  • Imię:Paweł
  • Lokalizacja:Dzierzgoń
Offline

Napisano 13.08.2012 20:27

Automatyczna wiadomość


Ten temat został przeniesiony z forum

AMX Mod X > Problemy

do

Scripting AMXX > Problemy
  • +
  • -
  • 0

DarkGL to mój autorytet.





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

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