Dało by rade żeby po wejściu gracza pisało jeszcze który jest w rankingu ? Wiem że to jest na amx_super ale ja chce osobno PLZ
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.
|
Guest Message by DevFuse
join_leave.amxx
Temat rozp. aruna, 12.07.2010 12:08
4 odpowiedzi w tym temacie
#1
Napisano 12.07.2010 12:08
Plugin >> join_leave
Dało by rade żeby po wejściu gracza pisało jeszcze który jest w rankingu ? Wiem że to jest na amx_super ale ja chce osobno PLZ
Dało by rade żeby po wejściu gracza pisało jeszcze który jest w rankingu ? Wiem że to jest na amx_super ale ja chce osobno PLZ
#2
Napisano 14.07.2010 10:35
daj kod źródłowy pluginu. (.sma)
#3
Napisano 14.07.2010 21:48
Proszę
Załączone pliki
#4
Napisano 15.07.2010 22:00
#include <amxmodx>
#include <csstats>
public plugin_init() {
register_plugin("Join/Leave Message","1.2","BigBaller & kyku")
register_cvar("amx_join_message", "Przychodzi %name%^nPozycja w rankingu: %rank%")
register_cvar("amx_joined_message", "%name% jest gotowy!^nPozycja w rankingu: %rank%")
register_cvar("amx_leave_message", "Odchodzi %name%")
register_cvar("amx_join_leave","1")
}
public client_connect(id){
new user[32], len
user[0] = id
len = get_user_name(id,user[1],31)
set_task(2.0, "join_msg", 0, user,len + 2)
return PLUGIN_CONTINUE
}
public client_putinserver(id){
new user[32], len
user[0] = id
len = get_user_name(id,user[1],31)
set_task(2.0, "joined_msg", 0, user,len + 2)
return PLUGIN_CONTINUE
}
public client_disconnect(id){
new user[32], len
user[0] = id
len = get_user_name(id, user[1], 31)
set_task(2.0, "leave_msg", 0, user, len + 2)
return PLUGIN_CONTINUE
}
public join_msg(user[]) {
if (get_cvar_num("amx_join_leave")==0){
return PLUGIN_HANDLED
}
if (get_cvar_num("amx_join_leave")==1){
new message[192]
get_cvar_string("amx_join_message", message, 191)
new srank[5],stats[8],bodyhits[8],rank = get_user_stats(get_user_index(user[1]), stats, bodyhits)
num_to_str(rank, srank, 4)
replace(message, 191, "%rank%", srank)
replace(message, 191, "%name%", user[1])
set_hudmessage(0, 225, 0, 0.05, 0.45, 0, 6.0, 6.0, 0.5, 0.15, 3)
show_hudmessage(0, message)
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}
public joined_msg(user[]) {
if (get_cvar_num("amx_join_leave")==0){
return PLUGIN_HANDLED
}
if (get_cvar_num("amx_join_leave")==1){
new message[192]
get_cvar_string("amx_joined_message", message, 191)
new srank[5],stats[8],bodyhits[8],rank = get_user_stats(get_user_index(user[1]), stats, bodyhits)
num_to_str(rank, srank, 4)
replace(message, 191, "%rank%", srank)
replace(message, 191, "%name%", user[1])
set_hudmessage(0, 225, 0, 0.05, 0.45, 0, 6.0, 6.0, 0.5, 0.15, 3)
show_hudmessage(0, message)
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}
public leave_msg(user[]) {
if (get_cvar_num("amx_join_leave")==0){
return PLUGIN_HANDLED
}
if (get_cvar_num("amx_join_leave")==1){
new message[192]
get_cvar_string("amx_leave_message", message, 191)
replace(message, 191, "%name%", user[1])
set_hudmessage(0, 225, 0, 0.05, 0.45, 0, 6.0, 6.0, 0.5, 0.15, 3)
show_hudmessage(0, message)
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}Powinno śmigać15 lipiec 2010 - 23:01:
tylko przy wychodzeniu z serwera nie sprawdza rankingu (zbyt duzo bawienia sie
#5
Napisano 16.07.2010 11:39
DZIAŁA THX
tylko na tym "Przychodzi %name%^nPozycja w rankingu: %rank%") rank pisze 0, a na: "%name% jest gotowy!^nPozycja w rankingu: %rank%") jest wszystko dobrze
Użytkownik aruna edytował ten post 19.07.2010 11:32
Użytkownicy przeglądający ten temat: 1
0 użytkowników, 1 gości, 0 anonimowych


Dodatki SourceMod



Temat jest zamknięty


join_leave.amxx






