←  Pytania

AMXX.pl: Support AMX Mod X i SourceMod

»

Pasek ładowania na nozu

Zablokowany

Blondyneczka ;* - zdjęcie Blondyneczka ;* 25.07.2012

Cześć, jak zrobic aby pasek ładował się tylko na nożu i jak dojdzie do końca gracz otrzymuje he i mp5.


public set_bartime(id, czas, startprogress=0)
{
			    message_begin((id)?MSG_ONE:MSG_ALL, get_user_msgid("BarTime2"), _, id)
			    write_short(czas);
			    write_short(startprogress);
			    message_end();   

}
Odpowiedz

Blondyneczka ;* - zdjęcie Blondyneczka ;* 26.07.2012

ref
Odpowiedz

  • +
  • -
glut - zdjęcie glut 26.07.2012

spróbuj

public set_bartime(id, czas, startprogress=0)
{
if(user_has_weapon(id,CSW_KNIFE)
{
message_begin((id)?MSG_ONE:MSG_ALL, get_user_msgid("BarTime2"), _, id)
write_short(czas);
write_short(startprogress);
message_end();
}
}


albo w CurWeapon

public CurWeapon( id )
{
if( read_data(2) == CSW_KNIFE )
{
message_begin((id)?MSG_ONE:MSG_ALL, get_user_msgid("BarTime2"), _, id)
write_short(czas);
write_short(startprogress);
message_end();
}
}


Tą drugą powinno działać :)
Użytkownik glut1997 edytował ten post 26.07.2012 20:15
Odpowiedz

Blondyneczka ;* - zdjęcie Blondyneczka ;* 26.07.2012

Teraz mam takie błędy :

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Error: Function argument may not have a default value (variable "startprogress") on line 17
Error: Expected token: ")", but found "{" on line 20

2 Errors.
Could not locate output file C:\Users\Metin2.Pl\Desktop\wh\noz.amx (compile failed).

ale dostałeś :plus:
Odpowiedz

  • +
  • -
glut - zdjęcie glut 26.07.2012

Sorka w tym pierwszym źle dałem :) Nie zamknołem nawiasu

public set_bartime(id, czas, startprogress=0)
{
if(user_has_weapon(id,CSW_KNIFE))
{
message_begin((id)?MSG_ONE:MSG_ALL, get_user_msgid("BarTime2"), _, id)
write_short(czas);
write_short(startprogress);
message_end();
}
}


a plusa nie dostałem i co kłamiesz ? Hehe :D
Użytkownik glut1997 edytował ten post 26.07.2012 20:23
Odpowiedz

Blondyneczka ;* - zdjęcie Blondyneczka ;* 26.07.2012

Sory już dostałeś :D


Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Error: Function argument may not have a default value (variable "startprogress") on line 17

1 Error.
Could not locate output file C:\Users\Metin2.Pl\Desktop\wh\noz.amx (compile failed).
Odpowiedz

  • +
  • -
glut - zdjęcie glut 26.07.2012

zamiast public powinno być

stock set_bartime(id, czas, startprogress=0)
{
if(user_has_weapon(id,CSW_KNIFE))
{
message_begin((id)?MSG_ONE:MSG_ALL, get_user_msgid("BarTime2"), _, id)
write_short(czas);
write_short(startprogress);
message_end();
}
}


Nie przypatrzyłem się wcześniej
Odpowiedz

Blondyneczka ;* - zdjęcie Blondyneczka ;* 26.07.2012

oke, kompiluje się lecz na serwerze nie działa ładowanie.
Odpowiedz

  • +
  • -
glut - zdjęcie glut 26.07.2012

a próbowałeś tym CurWeapon oczywiście w plugin_init

register_event("CurWeapon","CurWeapon","be", "1=1")


public CurWeapon( id )
{
if( read_data(2) == CSW_KNIFE )
{
message_begin((id)?MSG_ONE:MSG_ALL, get_user_msgid("BarTime2"), _, id)
write_short(czas);
write_short(startprogress);
message_end();
}
}
Odpowiedz

Blondyneczka ;* - zdjęcie Blondyneczka ;* 27.07.2012

Nie kompiluje :

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Error: Undefined symbol "czas" on line 22
Error: Number of arguments does not match definition on line 22
Error: Undefined symbol "startprogress" on line 23
Error: Number of arguments does not match definition on line 23

4 Errors.
Could not locate output file C:\Users\Metin2.Pl\Desktop\wh\noz.amx (compile failed).
Odpowiedz

Gość_21977_* 30.07.2012

Wiadomość wygenerowana automatycznie


Ten temat został zamknięty przez moderatora.

Powód: Autor tematu zbanowany

Jeśli się z tym nie zgadzasz, Dołączona grafika raportuj ten post, a moderator lub administrator rozpatrzy go ponownie.


Z pozdrowieniami,
Zespół AMXX.PL
Odpowiedz
Zablokowany