←  Problemy

AMXX.pl: Support AMX Mod X i SourceMod

»

[ROZWIĄZANE] Problem z native "set_use...

Zablokowany

  • +
  • -
LucKy_skiLL - zdjęcie LucKy_skiLL 30.10.2011

Takie mam bledy w logach po debug

L 10/30/2011 - 07:47:11: [FUN] Invalid player 6
L 10/30/2011 - 07:47:11: [AMXX] Displaying debug trace (plugin "vip.amxx")
L 10/30/2011 - 07:47:11: [AMXX] Run time error 10: native error (native "set_user_health")
L 10/30/2011 - 07:47:11: [AMXX]    [0] vip.sma::przywileje (line 34)


#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <hamsandwich>
#include <fakemeta_util>
#include <ColorChat>
#define PLUGIN "Dr vip"
#define VERSION "1.0"
#define AUTHOR "Truposz[WWL]"
new maxplayers
new gmsgSayText
static const COLOR[] = "^x04"

public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)

register_clcmd("say /vip","pokazujemotd");

RegisterHam(Ham_Spawn, "player", "przywileje", 1);
register_clcmd("say", "handle_say")
gmsgSayText = get_user_msgid("SayText")

maxplayers = get_maxplayers();

}
public przywileje(id){
if(get_user_flags(id) & ADMIN_LEVEL_H)
{
set_user_health(id, 150);
}
}
public handle_say(id)
{
new said[192]
read_args(said,192)
if(( containi(said, "who") != -1 && containi(said, "admin") != -1) || contain(said, "/vips") != -1)
set_task(0.1,"print_viplist", id)
return PLUGIN_CONTINUE
}
public print_viplist(user)
{
new adminnames[33][32]
new message[256]
new id, count, x, len

for(id = 1 ; id <= maxplayers ; id++)
if(is_user_connected(id))
if(get_user_flags(id) & ADMIN_LEVEL_H)
get_user_name(id, adminnames[count++], 31)
len = format(message, 255, "%s VIPy Online: ",COLOR)
if(count > 0) {
for(x = 0 ; x < count ; x++) {
len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"")
if(len > 96 ) {
print_message(user, message)
len = format(message, 255, "%s ",COLOR)
}
}
print_message(user, message)
}
else {
len += format(message[len], 255-len, "Brak VIPow Online")
print_message(user, message)
}
}
public pokazujemotd(id)
{
show_motd(id,"vip.txt","VIP [JailBreak]");
}
public client_putinserver(id)
{
if(get_user_flags(id) & ADMIN_LEVEL_H)
{
new name[32]
get_user_name(id,name,31)

set_hudmessage(255, 0, 0, -1.0, 0.25, 0, 1.0, 2.0, 0.1, 0.2, 2);
ColorChat(0,GREEN,"[VIP]^x01 Na serwer wchodzi VIP^x03 %s^x01 witamy :)",name);
}
}
print_message(id, msg[])
{
message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
write_byte(id)
write_string(msg)
message_end()
}



Proszę o pomoc.
Odpowiedz

  • +
  • -
speedkill - zdjęcie speedkill 30.10.2011

public przywileje(id){

            if(is_user_alive(id) && get_user_flags(id) & ADMIN_LEVEL_H)

  {

    set_user_health(id, 150);

            }

}
Odpowiedz

  • +
  • -
LucKy_skiLL - zdjęcie LucKy_skiLL 30.10.2011

Chyba działa, plusik ;]
Odpowiedz

  • +
  • -
Hiroshima - zdjęcie Hiroshima 30.10.2011

Wiadomość wygenerowana automatycznie


Ten temat został zamknięty przez moderatora.

Powód: Pomoc udzielona

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

  • +
  • -
Hiroshima - zdjęcie Hiroshima 30.10.2011

Automatyczna wiadomość


Ten temat został przeniesiony z forum:
AMX Mod XProblemy z pluginami
do
Scripting AMXXProblemy

Odpowiedz
Zablokowany