[ROZWIĄZANE] Poprawienie kodu vip lista
Flk 24.06.2012
może ktoś poprawic liste vipów
Użytkownik Arek :P edytował ten post 24.06.2012 15:43
public Viplist(id)
{
new players[32];
new playersNum;
new player;
new vipNum=0;
ColorChat(id,BLUE,"%s^x04 Vipy online:");
get_players(players, playersNum,"a");
{
vipNum++;
for(new i=0;i<playersNum;i++)
{
player=players[i];
new playerName[32];
get_user_name(player,playerName,31);
if(get_user_flags(player) & ADMIN_VIP)
{
ColorChat(id,RED,"%s",playerName);
}
}
}
if(vipNum==0)
{
ColorChat(id,BLUE,"%s^x01 Brak ^x04Vipow^x01 na Serwerze");
}
return PLUGIN_HANDLED;
}
Użytkownik Arek :P edytował ten post 24.06.2012 15:43
Gość_21977_* 24.06.2012
public Viplist(id)
{
new players[32];
new playerName[32];
new playersNum;
new player;
new vipNum=0;
ColorChat(id,BLUE,"%s^x04 Vipy online:");
get_players(players, playersNum,"ch");
for(new i=0;i<playersNum;i++)
{
player=players[i];
get_user_name(player,playerName,31);
if(get_user_flags(player) & ADMIN_VIP)
{
ColorChat(id,RED,"%s",playerName);
vipNum++;
}
}
if(vipNum==0)
{
ColorChat(id,BLUE,"%s^x01 Brak ^x04Vipow^x01 na Serwerze");
}
return PLUGIN_HANDLED;
}
Gość_21977_* 24.06.2012
I jeszcze Ci podrzucę moją funkcję, która wiem, że działa (za VIP dajesz flagi, np. "t"):
public pokaz_vipy_online(id){
// lista vipow online
new vipy[33][32];
new str[1024];
new count=0;
new i,n=get_maxplayers();
for(i=1; i<=n; ++i){
if(is_user_connected(i) && (get_user_flags(i) & read_flags(VIP))){
get_user_name(i, vipy[count], 31);
++count;
}
}
if(count){
format(str,1023, "VIP%s online:^x01 ",str, vipy[i], (count>1?"y":""));
for(i=0; i<count; ++i){
format(str,1023,"%s%s%s",str, vipy[i], (i<count-1?"^x04,^x01 ":"^x04."));
}
ColorChat(id,GREEN, str);
} else {
ColorChat(id,RED, "Brak VIPow online.");
}
return PLUGIN_HANDLED;
}
Flk 24.06.2012
nie wiem czemu ale nie działa
zrobiłem tak ale nie działa
Użytkownik Arek :P edytował ten post 24.06.2012 16:29
zrobiłem tak ale nie działa
[public pokaz_vipy_online(id){
// lista vipow online
new vipy[33][32];
new str[1024];
new count=0;
new i,n=get_maxplayers();
for(i=1; i<=n; ++i){
if(is_user_connected(i) && (get_user_flags(i) & read_flags(ADMIN_LEVEL_H))){
get_user_name(i, vipy[count], 31);
++count;
}
}
if(count){
format(str,1023, "VIP%s online:^x01 ",str, vipy[i], (count>1?"y":""));
for(i=0; i<count; ++i){
format(str,1023,"%s%s%s",str, vipy[i], (i<count-1?"^x04,^x01 ":"^x04."));
}
ColorChat(id,GREEN, str);
} else {
ColorChat(id,RED, "Brak VIPow online.");
}
return PLUGIN_HANDLED;
}
Użytkownik Arek :P edytował ten post 24.06.2012 16:29
Flk 24.06.2012
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright © 1997-2006 ITB CompuPhase, AMX Mod X Team
vip.sma(61) : error 010: invalid function or declaration
vip.sma(68) : error 010: invalid function or declaration
vip.sma(69) : error 010: invalid function or declaration
vip.sma(74) : error 010: invalid function or declaration
vip.sma(76) : error 010: invalid function or declaration
vip.sma(79) : error 021: symbol already defined: "ColorChat"
vip.sma(80) : error 010: invalid function or declaration
vip.sma(81) : error 021: symbol already defined: "ColorChat"
vip.sma(84) : error 010: invalid function or declaration
vip.sma(94) : warning 203: symbol is never used: "ColorChat"
vip.sma(94) : warning 203: symbol is never used: "ColorSelection"
vip.sma(94) : warning 203: symbol is never used: "FindPlayer"
vip.sma(94) : warning 203: symbol is never used: "ShowColorMessage"
vip.sma(94) : warning 203: symbol is never used: "Team_Info"
vip.sma(94) : warning 203: symbol is never used: "count"
vip.sma(94) : warning 203: symbol is never used: "i"
vip.sma(94) : warning 203: symbol is never used: "maxplayers"
vip.sma(94) : warning 203: symbol is never used: "n"
vip.sma(94) : warning 203: symbol is never used: "str"
vip.sma(94) : warning 203: symbol is never used: "vipy"
Copyright © 1997-2006 ITB CompuPhase, AMX Mod X Team
vip.sma(61) : error 010: invalid function or declaration
vip.sma(68) : error 010: invalid function or declaration
vip.sma(69) : error 010: invalid function or declaration
vip.sma(74) : error 010: invalid function or declaration
vip.sma(76) : error 010: invalid function or declaration
vip.sma(79) : error 021: symbol already defined: "ColorChat"
vip.sma(80) : error 010: invalid function or declaration
vip.sma(81) : error 021: symbol already defined: "ColorChat"
vip.sma(84) : error 010: invalid function or declaration
vip.sma(94) : warning 203: symbol is never used: "ColorChat"
vip.sma(94) : warning 203: symbol is never used: "ColorSelection"
vip.sma(94) : warning 203: symbol is never used: "FindPlayer"
vip.sma(94) : warning 203: symbol is never used: "ShowColorMessage"
vip.sma(94) : warning 203: symbol is never used: "Team_Info"
vip.sma(94) : warning 203: symbol is never used: "count"
vip.sma(94) : warning 203: symbol is never used: "i"
vip.sma(94) : warning 203: symbol is never used: "maxplayers"
vip.sma(94) : warning 203: symbol is never used: "n"
vip.sma(94) : warning 203: symbol is never used: "str"
vip.sma(94) : warning 203: symbol is never used: "vipy"
Flk 24.06.2012
dzięki za pomoc ale jak już wklejałem sma to zobaczyłem gdzie leży błąd
a mam jeszcze takie pytanko jak dodać do vipa speeda ?
Użytkownik Arek :P edytował ten post 24.06.2012 19:26
a mam jeszcze takie pytanko jak dodać do vipa speeda ?
Użytkownik Arek :P edytował ten post 24.06.2012 19:26
Gość_21977_* 24.06.2012
register_event("CurWeapon","CurWeapon","be","1=1");
public CurWeapon(id){
// zmiana predkosci maksymalnej
if(get_user_flags(id) & read_flags(VIP))
set_user_maxspeed(id, get_user_maxspeed(id) + get_cvar_num("vip_speed"));
return PLUGIN_CONTINUE;
}
Ojciec Dyrektor
25.06.2012
Wiadomość wygenerowana automatycznie
Ten temat został zamknięty przez moderatora.
Powód: Pomoc udzielona
Jeśli się z tym nie zgadzasz, raportuj ten post, a moderator lub administrator rozpatrzy go ponownie.
Z pozdrowieniami,
Zespół AMXX.PL
Ten temat został zamknięty przez moderatora.
Powód: Pomoc udzielona
Jeśli się z tym nie zgadzasz, raportuj ten post, a moderator lub administrator rozpatrzy go ponownie.
Z pozdrowieniami,
Zespół AMXX.PL