←  Pytania

AMXX.pl: Support AMX Mod X i SourceMod

»

Przeróbka diablo

Locked

  • +
  • -
Fryzjer's Photo Fryzjer 31.03.2011

Przerobi ktoś diablo moda tak żeby było koło wyboru klasy lvl postaci + system many ? Tutaj kod sma

Attached Files

Quote

  • +
  • -
Fryzjer's Photo Fryzjer 01.04.2011

jak to robię wywala mi błędy ;/
a jak dać lvl koło wyboru /klasa ?

Dodano 01 kwiecień 2011 - 07:20:
gdy robie sklepik
Welcome to the AMX Mod X 1.8.1-300 Compiler. Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team  menudbmod_5.9l.sma(1456) : warning 217: loose indentation menudbmod_5.9l.sma(2232) : error 003: declaration of a local variable must appear in a compound block menudbmod_5.9l.sma(2237) : error 010: invalid function or declaration menudbmod_5.9l.sma(2246) : error 010: invalid function or declaration menudbmod_5.9l.sma(2250) : error 010: invalid function or declaration menudbmod_5.9l.sma(2253) : error 010: invalid function or declaration menudbmod_5.9l.sma(2259) : error 010: invalid function or declaration menudbmod_5.9l.sma(2267) : error 010: invalid function or declaration menudbmod_5.9l.sma(2270) : error 010: invalid function or declaration menudbmod_5.9l.sma(2272) : error 010: invalid function or declaration menudbmod_5.9l.sma(2275) : error 021: symbol already defined: "message_begin" menudbmod_5.9l.sma(9233) : warning 204: symbol is assigned a value that is never used: "gmsgStatusText" menudbmod_5.9l.sma(9233) : warning 203: symbol is never used: "last_update_perc" menudbmod_5.9l.sma(9233) : warning 203: symbol is never used: "perc" menudbmod_5.9l.sma(9233) : warning 203: symbol is never used: "tpstring" menudbmod_5.9l.sma(9233) : warning 203: symbol is never used: "xp_need" menudbmod_5.9l.sma(9233) : warning 203: symbol is never used: "xp_now"  10 Errors. Could not locate output file menudbmod_5.9l.amxx (compile failed).


Dodano 01 kwiecień 2011 - 07:20:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright © 1997-2006 ITB CompuPhase, AMX Mod X Team

menudbmod_5.9l.sma(1456) : warning 217: loose indentation
menudbmod_5.9l.sma(2232) : error 003: declaration of a local variable must appear in a compound block
menudbmod_5.9l.sma(2237) : error 010: invalid function or declaration
menudbmod_5.9l.sma(2246) : error 010: invalid function or declaration
menudbmod_5.9l.sma(2250) : error 010: invalid function or declaration
menudbmod_5.9l.sma(2253) : error 010: invalid function or declaration
menudbmod_5.9l.sma(2259) : error 010: invalid function or declaration
menudbmod_5.9l.sma(2267) : error 010: invalid function or declaration
menudbmod_5.9l.sma(2270) : error 010: invalid function or declaration
menudbmod_5.9l.sma(2272) : error 010: invalid function or declaration
menudbmod_5.9l.sma(2275) : error 021: symbol already defined: "message_begin"
menudbmod_5.9l.sma(9233) : warning 204: symbol is assigned a value that is never used: "gmsgStatusText"
menudbmod_5.9l.sma(9233) : warning 203: symbol is never used: "last_update_perc"
menudbmod_5.9l.sma(9233) : warning 203: symbol is never used: "perc"
menudbmod_5.9l.sma(9233) : warning 203: symbol is never used: "tpstring"
menudbmod_5.9l.sma(9233) : warning 203: symbol is never used: "xp_need"
menudbmod_5.9l.sma(9233) : warning 203: symbol is never used: "xp_now"

10 Errors.
Could not locate output file menudbmod_5.9l.amxx (compile failed).
Edited by Fryzjer, 01.04.2011 06:57.
Quote

  • +
  • -
Spartanin's Photo Spartanin 01.04.2011

Level koło postaci w /klasa w standardowym silniku wygląda tak:

public select_class(id,lx[])
{
if(is_user_bot(id)) return
new flags[10]
get_cvar_string("diablo_classes",flags,9)
new text[512]
new keys = read_flags(flags)

asked_klass[id]=0

format(text, 511,"\yWybierz Klase : ^n")

for(new i=0;i<8;i++)
{
format(text, 511,"%s%s%d. %s Poziom :%d ^n",text,(keys)&(1<<i)?"\w":"\d",i+1,Race[i+1], lx[i+1])
}

show_menu(id, keys, text)
}

Oczywiście jest to fragment kodu samego Menu wybierania klasy.
Edited by Spartanin, 01.04.2011 13:04.
Quote

  • +
  • -
Fryzjer's Photo Fryzjer 01.04.2011

a dokładnie co za to odpowiada bo ja mam tak
}
public select_class(id,lx[])
{
        show_menu(id,menu, "\yWybierz Rodzaj Klasy^n^n\r1. \wLudzie^n\r2. \wPotwory^n\r3. \wPremium^n^n^n\d Nowa komenda! /exp",-1,"select_class");
}
public select_class_menu(id, key){
        switch(key){
                case 0:	
		{
			showklasy1(id)
                }
                case 1:
		{
			showklasy2(id)
                }
                case 2:
		{
			showklasy3(id)
                }
	}
        LoadXP(id, player_class[id]) 
        CurWeapon(id)
        
        give_knife(id)
        
        return PLUGIN_HANDLED
}

public showklasy1(id)
{
Quote
Locked