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
PaintballMod

Paintball + VIPproblem z Vipem.

PaintballMod

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

#1 Radek?

    Nowy

  • Nowy

Reputacja: 0
Nowy

  • Postów:3
  • Imię:Radek
  • Lokalizacja:Głogów
Offline

Napisano 17.08.2013 15:59

Mimo, że konto mam prawie 3 lata to jeszcze nie napisałem nawet posta także witam wszystkich :lol:


Mam problem z http://amxx.pl/topic...mod-by-respect/
mianowicie z vipem.

Wszystko działa, tylko broń dodatkowa vipa to p90, problem jest taki, że nie dostaje on dodatkowej amunicji, tylko podstawowe 50.

SMA VIP :

 

 

/* Plugin generated by AMXX-Studio */

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

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

#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, "ammo_57mm");

        
        
        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 xxx %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()
}

właściwie to z amunicją sam dopisałem "give_item(id, "ammo_57mm");", próbowałem także wpisywać to trzykrotnie - nic, na koncu dopisać 50/100... I niestety nic.

Error logi piszą:

 

 

 

L 08/17/2013 - 16:40:53: Start of error session.
L 08/17/2013 - 16:40:53: Info (map "de_paintball") (file "addons/amxmodx/logs/error_20130817.log")
L 08/17/2013 - 16:40:53: [FUN] Item "weapon_primammo" failed to create
L 08/17/2013 - 16:40:53: [AMXX] Displaying debug trace (plugin "paintball_vip.amxx")
L 08/17/2013 - 16:40:53: [AMXX] Run time error 10: native error (native "give_item")
L 08/17/2013 - 16:40:53: [AMXX]    [0] paintball_vip_1692361.sma::doGiveGrenades (line 65)
 
 
Edit : ZAPOMNIAŁEM CVARY ZAPODAĆ:
//legenda cvarow // 1- włączone / 0 - wyłączone   pozdrawiam RespecT i zapraszam na amxx.pl i cskaskada.xaa.pl !

amx_pbgun 1         //włacza paintballguns
pbgun_selectmode 0     //0 = wyłacza menu wyboru broni , 1= wlącza menu wybory broni
amx_pbdm 0         //Jeśli włączone to gracze będą ożywieni po 3sekundach po umarciu
pbgun_gravity 0     //włącza pellet gravitacje.
pbgun_nocrosshair 0     //celwnik 1- wlączony , 0-wyłączony
pbmoves_enabled 1     //Nie ruszać
amx_pbnade 1         //czy ma być granat włączony 1- tak / 0- nie
amx_pbgun_jam 1     //właczą bronie 1-włączone / 2 - wyłączone
amx_knifeonehitkill 1     //zabicie z noża 1 hit - 1- włączone/ 0- wyłączone
pbgun_real_pellets 1     //1 -Kilka granulek nie  nie eksploduje przy uderzeniu / 0 - wszystkie granulki eksploduja przy uderzeniu
amx_pbstrip 1        //Toggles if players weapons are stripped in spawn
pbgun_vendetta_enabled 1//wyłacza Vandeta i włacza zalecane 1
pbgun_vendetta_cant 3    //Zemsta
amx_pbsnade 1        //czy maja być kolorowe granaty. (dym)
pbgun_pbslauncher 1    //SUPER LAUNCHER w Mniejscu FLESHA ! ZALECANE 1
//Paintball moves misc vars
pbmoves_verbose 1         //Wiadomosci HUD
pbmoves_usebatterymeter 1     //Przełączanie za pomocą miernika baterii, aby wyświetlić wytrzymałość pozostałych
pbmoves_rechargetime 10.0     //SPRINT 10 sec max  przy przytrzymaniu PPM.

//inne//
pbgun_shots 100 //nie zmieniaj
pbgun_life 15     //paintball spawned
amx_pbmodel 1     //model graczy 1- właczony 2 - wyłączony

//tutaj nic nie zmieniaj//

//Weapons & gameplay misc vars (the "I want to customize everything" vars)
pbgun_damage 100         //Amount of damage a player takes when hit by a paintball
amx_pbspawnprotect 5         //Time in seconds a player cannot be killed after spawning (0 to disable)
pbnade_radius 150         //Radius (in cs units) a player has to be within to die from a grenade.
pbgun_fireratelow 1.1         //The fire-rate in seconds for slow weapons (launcher and sniper)
pbgun_fireratemedium 0.7     //The fire-rate in seconds for medium weapons (shotgun)
pbgun_fireratehigh 0.16     //The fire-rate for fast weapons (marker and guns)
pbgun_jamproblow 30         //How many shots in average will jam slow weapons (this is based on probability).
pbgun_jamprobhigh 100         //How many shots in average will jam fast weapons (this is based on probability).
pbgun_velocity_marker 2000     //The speed of the pellet shot by this weapon. Be carefull because this value CAN NOT be higher than your current sv_maxvelocity (the default for this is 2000 but my mod sets it to 4000).
pbgun_velocity_pistol 1500     //Idem.
pbgun_velocity_launcher 1500     //Idem.
pbgun_velocity_shotgun 1500     //Idem.
pbgun_velocity_sniper 4000     //Idem.
pbgun_dispersion 100         //How much average dispersion (recoil) the weapons have. This doesn't affect the sniper with scope.

//Cosmetic vars
pbgun_color 2 //Color of the paintball 1=Random 2=Team 3=Green/Orange 4=Yellow/Purple
pbgun_glow c //a = paintball glows, b = paintball has trail, c = none
pbgun_sound 1 //Toggles the shooting and hitting sounds
amx_pbmodel 0 //Toggles if players use the Paintball player model
amx_pbmoney 0 //Toggles if players money is stripped

A linia 65 to:

 

        give_item(id, "weapon_primammo");


Z góry dziękuje za pomoc ;)

 


Użytkownik Radek? edytował ten post 17.08.2013 16:07

  • +
  • -
  • 0

#2 0-0-0

    ● 600 punktów ostrzeżeń

  • Power User

Reputacja: 222
Profesjonalista

  • Postów:599
  • Imię:___
  • Lokalizacja:___
Offline

Napisano 17.08.2013 16:12

 

/* Plugin generated by AMXX-Studio */

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

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

#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, "ammo_57mm");

        give_item(id,"ammo_57mm");

        
        
        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 xxx %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
b_350_20_692108_381007_FFFFFF_000000.png - CS:GO [4FUN][Ruletka]
b_350_20_692108_381007_FFFFFF_000000.png - CS:GO [DM]
b_350_20_692108_381007_FFFFFF_000000.png - CS:GO [FFA]
b_350_20_692108_381007_FFFFFF_000000.png - CS:GO [Only Dust2]
b_350_20_692108_381007_FFFFFF_000000.png - CS:GO [Call of Duty]

#3 Radek?

    Nowy

  • Autor tematu
  • Nowy

Reputacja: 0
Nowy

  • Postów:3
  • Imię:Radek
  • Lokalizacja:Głogów
Offline

Napisano 17.08.2013 17:25

Przepraszam za dubel posta.
Niedokładnie czytałem forum, odpowiedź znalazłem.


EDIT:

Odpowiedź znalazłem tutaj: http://amxx.pl/topic...dyfikacja-vipa/


Użytkownik Radek? edytował ten post 17.08.2013 17:34

  • +
  • -
  • 0





Również z jednym lub większą ilością słów kluczowych: PaintballMod

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

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