Skocz do zawartości

  • Zaloguj korzystając z Facebooka Zaloguj korzystając z Twittera Zaloguj przez Steam Zaloguj poprzez Google      Logowanie »   
  • Rejestracja

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

Problem (niewiem jak to nazwać)Problem niewiem jak to nazwać


  • Zamknięty Temat jest zamknięty
2 odpowiedzi w tym temacie

#1 vip999

    Nowy

  • Użytkownik

Reputacja: 0
zer0.

  • Postów:8
  • GG:
  • Steam:steam
  • Imię:Patryk
  • Lokalizacja:szczecin
Offline

Napisano 11.11.2010 10:33

witam wiec mam taki problem mam 2 serwery Diablomod i Call of duty mod
Call of duty Mod jest na silniku Diablo jest wszystko to samo tylko ze
zmieniłem nazwy postaci i tu jest haczyk

Welcome to the AMX Mod X 1.76-300 Compiler
Copyright © 1997-2006 ITB CompuPhase, AMX Mod X Team

Header size: 9248 bytes
Code size: 325824 bytes
Data size: 253964 bytes
Stack/heap size: 16384 bytes; max, usage is unknown, due to recursion
Total requirements: 605420 bytes
Done.


w consoli serwera wyskakuje mi przy uruchamianiu

L 11/11/2010 - --:--:--: [AMXX] Run time error 10 (plugin "cod.amxx") (native "get_pcvar_num") - debug not enabled!
L 11/11/2010 - --:--:--: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 11/11/2010 - --:--:--: Invalid CVAR pointer
L 11/11/2010 - --:--:--: [AMXX] Displaying debug trace (plugin "cod.amxx")
L 11/11/2010 - --:--:--: [AMXX] Run time error 10: native error (native "get_pcvar_num")
L 11/11/2010 - --:--:--: [AMXX]    [0] cod.sma::client_PreThink (line 2473)

to mi pokazuje ta linijkę
public write_hud(id)
{
    if (player_lvl[id] == 0)
        player_lvl[id] = 1
            
    new tpstring[1024] 
    
    new Float:xp_now
    new Float:xp_need
    new Float:perc
    
    if (last_update_xp[id] == player_xp[id])
    {
        perc = last_update_perc[id]
    }
    else
    {
        //Calculate percentage of xp required to level
        if (player_lvl[id] == 1)
        {
            xp_now = float(player_xp[id])
            xp_need = float(LevelXP[player_lvl[id]])
            perc = xp_now*100.0/xp_need
        }
        else
        {
            xp_now = float(player_xp[id])-float( LevelXP[player_lvl[id]-1])
            xp_need = float(LevelXP[player_lvl[id]])-float(LevelXP[player_lvl[id]-1])
            perc = xp_now*100.0/xp_need
        }
    }
    
    last_update_xp[id] = player_xp[id]
    last_update_perc[id] = perc
    
    if(player_class[id]!=Klasa)
        format(tpstring,1023,"Klasa: %s Level: %i (%0.0f%s) Item: %s [%i]", Race[player_class[id]], player_lvl[id], perc,"%%",player_item_name[id],item_durability[id])
    else
        format(tpstring,1023,"Klasa: %s Level: %i (%0.0f%s) Item: %s [%i]", Race[player_class[id]], player_lvl[id], perc,"%%",player_item_name[id],item_durability[id])
        
    message_begin(MSG_ONE,gmsgStatusText,{0,0,0}, id)
    write_byte(0) 
    write_string(tpstring) 
    message_end() 
}

client_PreThink
public client_PreThink ( id ) 
{
    if(!is_user_alive(id)||is_user_bot(id)) return PLUGIN_CONTINUE    
        new clip,ammo
        new weapon = get_user_weapon(id,clip,ammo)
        new button2 = get_user_button(id);
        if(player_class[id]==klasa && weapon == CSW_KNIFE && freeze_ended) 
        { 
                if((button2 & IN_DUCK) && (button2 & IN_JUMP)) 
                { 
                        if(JumpsLeft[id]>0) 
                        { 
                                new flags = pev(id,pev_flags) 
                                if(flags & FL_ONGROUND) 
                                { 
                                        set_pev ( id, pev_flags, flags-FL_ONGROUND ) 
                                
                                        JumpsLeft[id]-- 
                                
                                        new Float:va[3],Float:v[3] 
                                        entity_get_vector(id,EV_VEC_v_angle,va) 
                                        v[0]=floatcos(va[1]/180.0*M_PI)*560.0 
                                        v[1]=floatsin(va[1]/180.0*M_PI)*560.0 
                                        v[2]=300.0 
                                        entity_set_vector(id,EV_VEC_velocity,v) 
                                        write_hud(id)
                                } 
                        } 
                } 
        }
        if(flashlight[id] && flashbattery[id] && (get_cvar_num("flashlight_custom")) && (player_class[id] == klasa || player_b_latarka[id] == 1)) {
        new num1, num2, num3
        num1=random_num(0,2)
        num2=random_num(-1,1)
        num3=random_num(-1,1)
        flashlight_r+=1+num1
        if (flashlight_r>250) flashlight_r-=245
        flashlight_g+=1+num2
        if (flashlight_g>250) flashlight_g-=245
        flashlight_b+=-1+num3
        if (flashlight_b<5) flashlight_b+=240        
        new origin[3];
        get_user_origin(id,origin,3);
        message_begin(MSG_BROADCAST,SVC_TEMPENTITY);
        write_byte(27); // TE_DLIGHT
        write_coord(origin[0]); // X
        write_coord(origin[1]); // Y
        write_coord(origin[2]); // Z
        write_byte(get_cvar_num("flashlight_radius")); // radius
        write_byte(flashlight_r); // R
        write_byte(flashlight_g); // G
        write_byte(flashlight_b); // B
        write_byte(1); // life
        write_byte(get_cvar_num("flashlight_decay")); // decay rate
        message_end();
        
        new index1, bodypart1
        get_user_aiming(id,index1,bodypart1) 
        if ((get_user_team(id)!=get_user_team(index1)) && (index1!=0))
        {
            if ((index1!=54) && (is_user_connected(index1))) set_user_rendering(index1,kRenderFxGlowShell,flashlight_r,flashlight_g,flashlight_b,kRenderNormal,4)    
            remove_task(TASK_FLASH_LIGHT+index1);
            set_task(7.5, "un_rander",TASK_FLASH_LIGHT+index1)
            //set_task(15.0,"un_rander",TASK_NAME,index1)
        }
    }

    //Before freeze_ended check
    if (((player_b_silent[id] > 0) || (player_class[id] == klasa)) && is_user_alive(id)) 
        entity_set_int(id, EV_INT_flTimeStepSound, 300)
        
    new Float:vect[3]
    entity_get_vector(id,EV_VEC_velocity,vect)
    new Float: sped= floatsqroot(vect[0]*vect[0]+vect[1]*vect[1]+vect[2]*vect[2])
    if((get_user_maxspeed(id)*5)>(sped*9))
        entity_set_int(id, EV_INT_flTimeStepSound, 300)
    // mooz
    if (button2 & IN_ATTACK2 && player_class[id]==klasa &&  !(get_user_oldbutton(id) & IN_ATTACK2))
    {
    if (weapon !=CSW_KNIFE && weapon != CSW_AWP && weapon != CSW_SCOUT && weapon != CSW_G3SG1 && weapon != CSW_M249 && weapon != CSW_M3 
    && weapon != CSW_SG550 && weapon != CSW_ELITE && weapon != CSW_P228 && weapon != CSW_FIVESEVEN && weapon != CSW_C4 && weapon != CSW_FLASHBANG 
    && weapon != CSW_HEGRENADE && weapon != CSW_SMOKEGRENADE  && weapon != CSW_XM1014)
        {
                        if (cs_get_user_zoom(id)==CS_SET_NO_ZOOM) cs_set_user_zoom ( id, CS_SET_AUGSG552_ZOOM, 1 ) 
                        else cs_set_user_zoom(id,CS_SET_NO_ZOOM,1)
        }
    }
    
    
    //USE Button actives USEMAGIC
    
    if (get_entity_flags(id) & FL_ONGROUND && (!(button2 & (IN_FORWARD+IN_BACK+IN_MOVELEFT+IN_MOVERIGHT)) || (player_class[id] == klasa && player_b_fireball[id]==0)) && 
is_user_alive(id) && (on_knife[id] || (player_class[id] == klasa && player_b_fireball[id])) && player_class[id]!=NONE && player_class[id]!=klasa && invisible_cast[id]==0)
    //player_class[id]!=NONE && player_class[id]!=klasa && invisible_cast[id]==0 &&
    //player_class[id]!=NONE && player_class[id]!=klasa && invisible_cast[id]==0 &&
    //player_class[id]!=NONE && player_class[id]!=klasa && invisible_cast[id]==0 &&
    //player_class[id]!=NONE && player_class[id]!=klasa && invisible_cast[id]==0 &&
    //player_class[id]!=NONE && player_class[id]!=klasa && invisible_cast[id]==0 &&
    //player_class[id]!=NONE && player_class[id]!=klasa && invisible_cast[id]==0 &&
    //player_class[id]!=NONE && player_class[id]!=klasa && invisible_cast[id]==0 &&
    //player_class[id]!=NONE && player_class[id]!=klasa && invisible_cast[id]==0 &&
    //player_class[id]!=NONE && player_class[id]!=klasa && invisible_cast[id]==0 &&
    //player_class[id]!=NONE && player_class[id]!=klasa && invisible_cast[id]==0 &&
    //player_class[id]!=NONE && player_class[id]!=klasa && invisible_cast[id]==0 &&
    //player_class[id]!=NONE && player_class[id]!=klasa && invisible_cast[id]==0 &&
    //player_class[id]!=NONE && player_class[id]!=klasa && invisible_cast[id]==0 &&
    //player_class[id]!=NONE && player_class[id]!=klasa && invisible_cast[id]==0 &&
    //player_class[id]!=NONE && player_class[id]!=klasa && invisible_cast[id]==0 &&
    //player_class[id]!=NONE && player_class[id]!=klasa && invisible_cast[id]==0 &&
    //player_class[id]!=NONE && player_class[id]!=klasa && invisible_cast[id]==0 &&
    //player_class[id]!=NONE && player_class[id]!=klasa && invisible_cast[id]==0 &&
    //player_class[id]!=NONE && player_class[id]!=klasa && invisible_cast[id]==0 &&
    //player_class[id]!=NONE && player_class[id]!=klasa && invisible_cast[id]==0 &&
    //player_class[id]!=NONE && player_class[id]!=klasa && invisible_cast[id]==0 &&
    //player_class[id]!=NONE && player_class[id]!=klasa && invisible_cast[id]==0 &&
    //player_class[id]!=NONE && player_class[id]!=klasa && invisible_cast[id]==0)
    {

        if(casting[id]==1 && halflife_time()>cast_end[id])
        {
            message_begin( MSG_ONE, gmsgBartimer, {0,0,0}, id ) 
            write_byte( 0 ) 
            write_byte( 0 ) 
            message_end() 
            casting[id]=0
            call_cast(id)
        }
        else if(casting[id]==0)
        {
            new Float: time_delay = 5.0-(player_intelligence[id]/25.0)

            if(player_class[id] == klasa) time_delay*=2.0
            else if(player_class[id] == klasa) time_delay*=2.0
            else if(player_class[id] == klasa) time_delay*=1.4
            
            cast_end[id]=halflife_time()+time_delay
            
            new bar_delay = floatround(time_delay,floatround_ceil)
            
            casting[id]=1
            
            message_begin( MSG_ONE, gmsgBartimer, {0,0,0}, id ) 
            write_byte( bar_delay ) 
            write_byte( 0 ) 
            message_end() 
        }
    }
    else 
    {    
        if(casting[id]==1)
        {
            message_begin( MSG_ONE, gmsgBartimer, {0,0,0}, id ) 
            write_byte( 0 ) 
            write_byte( 0 ) 
            message_end()     
        }
        casting[id]=0            
    }
    
    
    if (pev(id,pev_button) & IN_USE && !casting[id])
        Use_Spell(id)
    
        
    
    
    return PLUGIN_CONTINUE        
}
Modoly
;;;
; To enable a module, remove the semi-colon (<img src='http://amxx.pl/public/style_emoticons/<#EMO_DIR#>/wink.gif' class='bbc_emoticon' alt=';)' /> in front of its name.
; If it's not here, simply add it its name, one per line.
; You don't need to write the _amxx part or the file extension.
;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; SQL Modules usually need to be enabled manually ;;
;; You can have any number on at a time.  Use      ;;
;;  amx_sql_type in sql.cfg to specify the default ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

cstrike
mysql
sqlite

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Put third party modules below here.              ;;
;; You can just list their names, without the _amxx ;;
;;  or file extension.                              ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; These modules will be auto-detected and loaded   ;;
;;  as needed.  You do not need to enable them here ;;
;;  unless you have problems.                       ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

fun
engine
fakemeta
;geoip
;sockets
;regex
nvault
csx
hamsandwich
ilość message_begin(*

message_begin = 40

ilość message_end()

message_end() = 40


Proszę o pomoc
jeżeli czegoś jeszcze potrzeba pisać
dodatkowe info
- AMXMODX 1.8.2
- Serwer na Gry.Wilan.pl
- serwer 17 Slotowy
zastrzegam sobie pisanie nazw klas każda klasa się inaczej nazywa
Serwer Diablo działa poprawnie a Cod Zle ;/

Użytkownik vip999 edytował ten post 11.11.2010 11:49

  • +
  • -
  • 0

#2 mgr inż. Pavulon

    C35H60Br2N2O4

  • Przyjaciel

Reputacja: 1725
Godlike

  • Postów:6881
  • Steam:steam
  • Imię:Konrad
  • Lokalizacja:Koniecpol
Offline

Napisano 11.11.2010 10:54

coś chyba jednak zły kod dałeś, bo nie występuje w nim nigdzie get_pcvar_num którego to błąd dotyczy
  • +
  • -
  • 0

#3 vip999

    Nowy

  • Autor tematu
  • Użytkownik

Reputacja: 0
zer0.

  • Postów:8
  • GG:
  • Steam:steam
  • Imię:Patryk
  • Lokalizacja:szczecin
Offline

Napisano 11.11.2010 11:20

oto kody gdzie występuje get_pcvar_num
public fwd_emitsound(id, channel, sound[]) 
{
	if(!is_user_alive(id) || !g_haskit[id])
		return FMRES_IGNORED	
	
	if(!equali(sound, "common/wpn_denyselect.wav"))
		return FMRES_IGNORED	
	
	if(task_exists(TASKID_REVIVE + id))
		return FMRES_IGNORED
	
	if(!(fm_get_user_button(id) & IN_USE))
		return FMRES_IGNORED
	
	new body = find_dead_body(id)
	if(!fm_is_valid_ent(body))
		return FMRES_IGNORED

	new lucky_bastard = pev(body, pev_owner)
	new lb_team = get_user_team(lucky_bastard)
	if(lb_team != 1 && lb_team != 2)
		return FMRES_IGNORED

	static name[32]
	get_user_name(lucky_bastard, name, 31)
	client_print(id, print_chat, "Reviving %s", name)
		
	new revivaltime = get_pcvar_num(cvar_revival_time)
	msg_bartime(id, revivaltime)
	
	new Float:gametime = get_gametime()
	g_revive_delay[id] = gametime + float(revivaltime) - 0.01

	emit_sound(id, CHAN_AUTO, SOUND_START, VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
	set_task(0.0, "task_revive", TASKID_REVIVE + id)
	
	return FMRES_SUPERCEDE
}

public task_setplayer(args[])
{
    new id = args[0]
    
    fm_give_item(id, "weapon_knife")
    
    if(args[1]==1)
    {
        fm_give_item(id, "weapon_mp5navy")
        change_health(id,999,0,"")        
        set_user_godmode(id, 1)
        
        new newarg[1]
        newarg[0]=id
        
        set_task(3.0,"god_off",id+95123,newarg,1)
    }
    else
    {
        fm_set_user_health(id, get_pcvar_num(cvar_revival_health)+player_intelligence[args[2]])
                
        Display_Fade(id,seconds(2),seconds(2),0,0,0,0,255)
    }
    
    if(player_item_id[id]==17) fm_set_user_health(id,5)
}

  • +
  • -
  • 0




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

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