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

2 rodzaje klas


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

#1 Krejzol

    Wszechpomocny

  • Użytkownik

Reputacja: 48
Pomocny

  • Postów:357
Offline

Napisano 09.05.2010 08:40

Witam. Chciałbym zrobić, gdy wpisze /klasa to pokazują sie 2 możliwości
*Ludzie
*Potwory

Zrobiłem tak;
#define KeysKlasy1 (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<8)|(1<<9)
#define KeysKlasy2 (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<8)|(1<<9)
#define keyss (1<<0)|(1<<1)(1<<9)


public select_class(id,lx[])
{
if(is_user_bot(id)) return
new flags[13]
get_cvar_string("diablo_classes",flags,13)
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^n9. Dalej^n",text)
show_menu(id, keyss, text)

}

public select_class_menu(id, key)
{
new lx[13]
g_haskit[id] = 0
switch(key)
{
case 0:
{
ShowKlasy1(id,lx)
}
case 1:
{
ShowKlasy2(id,lx)
}
}

LoadXP(id, player_class[id])
CurWeapon(id)

give_knife(id)

return PLUGIN_HANDLED
}

/* ==================================================================================================== */

public ShowKlasy1(id,lx[]) {
new text2[512]
asked_klass[id]=0
format(text2, 511,"\yWybierz klase - ^n\w1. klasa1 Level :%i^n2. klasa2 Level :%i^n3. klasa3 Level :%i^n^n0.Wstecz^n",player_class_lvl[id][9],player_class_lvl[id][10],player_class_lvl[id][11])
show_menu(id, KeysKlasy,text2, -1, "Klasy")


}
public PressedKlasy(id, key) {
/* Menu:
* Wybierz klase:
* 1:klasa1
* 2:klasa2
* 3:klasa3
* 0:Wstecz
*/
new lx[13]
g_haskit[id] = 0
switch (key) {
case 0: { // 1
player_class[id] = klasa1


}
case 1: { // 2
player_class[id] = klasa2

}
case 2: { // 3
player_class[id] = klasa3
}
case 9: { // 0
select_class(id,lx)
}
}
LoadXP(id, player_class[id])
CurWeapon(id)
give_knife(id)

return PLUGIN_HANDLED
}

/* ==================================================================================================== */

public ShowKlasy2(id,lx[]) {
new text2[512]
asked_klass[id]=0
format(text2, 511,"\yWybierz klase - ^n\w1. klasa12 Level :%i^n2. klasa22 Level :%i^n3. klasa32 Level :%i^n^n0.Wstecz^n",player_class_lvl[id][9],player_class_lvl[id][10],player_class_lvl[id][11])
show_menu(id, KeysKlasy,text2, -1, "Klasy")


}
public PressedKlasy(id, key) {
/* Menu:
* Wybierz klase:
* 1:klasa12
* 2:klasa22
* 3:klasa32
* 0:Wstecz
*/
new lx[13]
g_haskit[id] = 0
switch (key) {
case 0: { // 1
player_class[id] = klasa12


}
case 1: { // 2
player_class[id] = klasa22

}
case 2: { // 3
player_class[id] = klasa32
}
case 9: { // 0
select_class(id,lx)
}
}
LoadXP(id, player_class[id])
CurWeapon(id)
give_knife(id)

return PLUGIN_HANDLED
}


Mógłby mi ktoś powiedzieć jak zrobić że gdy wpisze klasa to pokazują sie Ludzie i Potwory? I czy mam to dobrze, a jak nie to proszę pomożcie ;)
  • +
  • -
  • 0

#2 SoLiD

    Wszechwidzący

  • Użytkownik

Reputacja: 36
Życzliwy

  • Postów:253
  • Lokalizacja:Polska
Offline

Napisano 09.05.2010 13:22

Tak na szybko:
public select_class(id,lx[])
{
new text[512]

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

for(new i=0;i<8;i++)
format(text, 511,"1. Ludzie ^n2. Potwory",text)
show_menu(id, keyss, text)

}

public select_class_menu(id, key)
{
new lx[13]
g_haskit[id] = 0
switch(key)
{
case 0:
{
ShowKlasy1(id,lx)
}
case 1:
{
ShowKlasy2(id,lx)
}
}
return PLUGIN_HANDLED
}

/* ==================================================================================================== */

public ShowKlasy1(id,lx[]) {
new text2[512]
asked_klass[id]=0
format(text2, 511,"\yWybierz klase - ^n\w1. klasa1 Level :%i^n2. klasa2 Level :%i^n3. klasa3 Level :%i^n^n0.Wstecz^n",player_class_lvl[id][9],player_class_lvl[id][10],player_class_lvl[id][11])
show_menu(id, KeysKlasy,text2, -1, "Klasy")


}
public PressedKlasy(id, key) {
/* Menu:
* Wybierz klase:
* 1:klasa1
* 2:klasa2
* 3:klasa3
* 0:Wstecz
*/
new lx[13]
g_haskit[id] = 0
switch (key) {
case 0: { // 1
player_class[id] = klasa1


}
case 1: { // 2
player_class[id] = klasa2

}
case 2: { // 3
player_class[id] = klasa3
}
case 9: { // 0
select_class(id,lx)
}
}
LoadXP(id, player_class[id])
CurWeapon(id)
give_knife(id)

return PLUGIN_HANDLED
}

/* ==================================================================================================== */

public ShowKlasy2(id,lx[]) {
new text2[512]
asked_klass[id]=0
format(text2, 511,"\yWybierz klase - ^n\w1. klasa12 Level :%i^n2. klasa22 Level :%i^n3. klasa32 Level :%i^n^n0.Wstecz^n",player_class_lvl[id][9],player_class_lvl[id][10],player_class_lvl[id][11])
show_menu(id, KeysKlasy,text2, -1, "Klasy")


}
public PressedKlasy(id, key) {
/* Menu:
* Wybierz klase:
* 1:klasa12
* 2:klasa22
* 3:klasa32
* 0:Wstecz
*/
new lx[13]
g_haskit[id] = 0
switch (key) {
case 0: { // 1
player_class[id] = klasa12


}
case 1: { // 2
player_class[id] = klasa22

}
case 2: { // 3
player_class[id] = klasa32
}
case 9: { // 0
select_class(id,lx)
}
}
LoadXP(id, player_class[id])
CurWeapon(id)
give_knife(id)

return PLUGIN_HANDLED
}

  • +
  • -
  • 0
Force Important Commands [FIC] - http://www.mediafire...18j1kh7txf49o04
Info: FIC jest pluginem, który wymusza komendy u graczy i ma opracowany system karania banem u graczy, którzy nadmiernie zmieniają ich wartości na niedozwoloną.
Zaufali mu administratorzy HashJama, zaufaj i ty!

#3 LoleczeQ

    Profesjonalista

  • Użytkownik

Reputacja: 4
Nowy

  • Postów:199
  • Lokalizacja:Tbg
Offline

Napisano 09.05.2010 16:36

Nie jestem pewien ale zbuguje Ci się menu...
  • +
  • -
  • 0

#4 Krejzol

    Wszechpomocny

  • Autor tematu
  • Użytkownik

Reputacja: 48
Pomocny

  • Postów:357
Offline

Napisano 09.05.2010 17:28

Podczas kompilacji;

/home/groups/amxmodx/compiler3/core(0) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(5) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(6) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(7) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(8) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(9) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(10) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(11) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(12) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(13) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(14) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(15) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(17) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(18) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(19) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(20) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(21) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(22) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(23) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(24) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(25) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(26) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(27) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(28) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(29) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(30) : error 075: input line too long (after substitutions)


Dam reputa jeśli mi ktoś to skompiluje.

Załączone pliki


  • +
  • -
  • 0

#5 mgr inż. Pavulon

    C35H60Br2N2O4

  • Przyjaciel

Reputacja: 1 742
Godlike

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

Napisano 13.05.2010 17:52

Ja tam widzę pełno innych kodów w tym twoim kodzie...
Welcome to the AMX Mod X 1.76-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Error: Undefined symbol "select_class" on line 4568
Error: Undefined symbol "select_class" on line 4613
Error: Start of function body without function header on line 4620
Error: Symbol already defined: "format" on line 4623
Error: Invalid function or declaration on line 4625
Error: Unmatched closing brace on line 4629
Warning: Loose indentation on line 4634
Error: Array index out of bounds (variable "player_class_lvl") on line 4654
Error: Undefined symbol "KeysKlasy" on line 4655
Warning: Expression has no effect on line 4655
Warning: Expression has no effect on line 4655
Warning: Expression has no effect on line 4655
Error: Expected token: ";", but found ")" on line 4655
Error: Invalid expression, assumed zero on line 4655
Error: Too many error messages on one line on line 4655

Compilation aborted.
11 Errors.
Could not locate output file dbmod_5.9l.amx (compile failed).

  • +
  • -
  • 0




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

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