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
Nowy Plugin

VIP do bf2 obrażenia

Nowy Plugin

  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
9 odpowiedzi w tym temacie

#1 K1noS

    Zaawansowany

  • Użytkownik

Reputacja: -4
Nowy

  • Postów:90
  • GG:
  • Lokalizacja:Gdynia
Offline

Napisano 09.03.2012 17:18

Witam czy mógłby mi ktoś zrobić / dorobić aby vip widział obrażenia przez ściane . Używam tego pluginu
http://amxx.pl/topic...-bullet-damage/
2. Ktoś może mi zrobić ten plug tak aby nie wywalało errorów.


[AMXX] Run time error 10: native error (native "cs_get_user_money")
L 03/09/2012 - 08:33:32: [AMXX]    [0] vip.sma::DeathMsg (line 80)

Wyskakują mi errory z tym cs_get_user_money

Oto plugin:

#include <amxmodx>
#include <hamsandwich>
#include <fun>
#include <cstrike>
#include <fakemeta>
#include <engine>
#include <fakemeta_util>
#define ADMIN_VIP ADMIN_LEVEL_H
#define SCOREATTRIB_NONE 0
#define SCOREATTRIB_DEAD (1<<0)
#define SCOREATTRIB_BOMB (1<<1)
#define SCOREATTRIB_VIP (1<<2)new bool:moze_skoczyc[33];
new g_type, g_enabled, g_recieved, bool:g_showrecieved, g_hudmsg1, g_hudmsg2
new nick_gracza[32]
new cvar_motd, cvar_info_vip;

public plugin_init() {
register_plugin("VIP", "1.0", "Screeaam..")

RegisterHam(Ham_Spawn, "player", "Spawned", 1);
register_event("DeathMsg", "DeathMsg", "a")
register_message(get_user_msgid("ScoreAttrib"), "MessageScoreAttrib");
register_forward(FM_CmdStart, "CmdStart");
register_clcmd("say /vip", "vip_bonusy")register_event("Damage", "on_damage", "b", "2!0", "3=0", "4!0")
register_event("HLTV", "on_new_round", "a", "1=0", "2=0")

g_type = register_cvar("amx_bulletdamage","1");
g_recieved = register_cvar("amx_bulletdamage_recieved","1");

g_hudmsg1 = CreateHudSyncObj();
g_hudmsg2 = CreateHudSyncObj();

cvar_motd = register_cvar("vip_motd","1"); // pokazywac motd z info o vipach
cvar_info_vip = register_cvar("vip_info","1"); // pokazywac info gdy wchodzi vip ( przaychdozi VIP nick)
}
public MessageScoreAttrib(iMsgID, iDest, iReceiver)
{
new iPlayer = get_msg_arg_int(1);
if( is_user_connected(iPlayer) && (get_user_flags(iPlayer) & ADMIN_VIP))
{
set_msg_arg_int( 2, ARG_BYTE, is_user_alive(iPlayer) ? SCOREATTRIB_VIP : SCOREATTRIB_DEAD);
}
}public Spawned(id)
{
if(!is_user_alive(id))
return PLUGIN_HANDLED;

if(get_user_flags(id) & ADMIN_VIP)
{
set_user_health(id, 115);

if(cs_get_user_team(id) == CS_TEAM_CT)
give_item(id, "item_thighpack");

set_user_armor(id, 100);
moze_skoczyc[id] = true;
}

return PLUGIN_CONTINUE;
}
public DeathMsg()
{
new kid = read_data(1);
new hs = read_data(3);

if(get_user_flags(kid) & ADMIN_VIP)
{
new kasa = 300 + hs ? 500 : 0;

if(cs_get_user_money(kid) > 16000) cs_set_user_money(kid, 16000, 1);

if(hs) set_user_frags(kid, get_user_frags(kid) + 2);

message_begin(MSG_ALL,85)
write_byte(kid)
write_short(get_user_frags(kid))
write_short(get_user_deaths(kid))
write_short(0)
write_short(get_user_team(kid))
message_end()
}
}public client_disconnect(id)
{
new info_vip_con = get_pcvar_num(cvar_info_vip)
if(info_vip_con == 1)
{
if (get_user_flags(id) & ADMIN_VIP)
{
get_user_name(id, nick_gracza, 32);
set_hudmessage(0, 255, 0, 0.04, 0.28, 0, 6.0, 12.0)
show_hudmessage(0, "Odchodzi VIP %s", nick_gracza)
}
}
}
public client_authorized(id)
{
new info_vip_con = get_pcvar_num(cvar_info_vip)
if(info_vip_con == 1)
{
if (get_user_flags(id) & ADMIN_VIP)
{
get_user_name(id, nick_gracza, 32);
set_hudmessage(255, 0, 0, 0.04, 0.28, 0, 6.0, 12.0)
show_hudmessage(0, "Przychodz VIP %s", nick_gracza)

}

}
}
public CmdStart(id, uc_handle)
{
if(!is_user_alive(id))
return FMRES_IGNORED;

new flags = pev(id, pev_flags);

if((get_uc(uc_handle, UC_Buttons) & IN_JUMP) && !(flags & FL_ONGROUND) && !(pev(id, pev_oldbuttons) & IN_JUMP) && moze_skoczyc[id] && (get_user_flags(id) & ADMIN_VIP))
{
moze_skoczyc[id] = false;
new Float:velocity[3];
pev(id, pev_velocity,velocity);
velocity[2] = random_float(265.0,285.0);
set_pev(id, pev_velocity,velocity);
}
else if(flags & FL_ONGROUND)
moze_skoczyc[id] = true;

return FMRES_IGNORED;
}public CurWeapon(id)
{
if(get_user_flags(id) & ADMIN_VIP)
set_user_maxspeed(id, get_user_maxspeed(id) + 110.0);

return PLUGIN_CONTINUE;
}
public vip_bonusy(id)
{
new motd_s = get_pcvar_num(cvar_motd)

if (motd_s == 1)
show_motd(id, "vip.txt", "Vip Info")
}public on_new_round()
{
g_enabled = get_pcvar_num(g_type)
if(get_pcvar_num(g_recieved)) g_showrecieved = true
}
public on_damage(id)
{
if(get_user_flags(id) & ADMIN_VIP){
if(g_enabled)
{
static attacker; attacker = get_user_attacker(id)
static damage; damage = read_data(2)
if(g_showrecieved)
{
set_hudmessage(255, 0, 0, 0.45, 0.50, 2, 0.1, 4.0, 0.1, 0.1, -1)
ShowSyncHudMsg(id, g_hudmsg2, "%i^n", damage)
}
if(is_user_connected(attacker))
{
switch(g_enabled)
{
case 1: {
set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, -1)
ShowSyncHudMsg(attacker, g_hudmsg1, "%i^n", damage)
}
case 2: {
if(fm_is_ent_visible(attacker,id))
{
set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, -1)
ShowSyncHudMsg(attacker, g_hudmsg1, "%i^n", damage)
}
}
}
}
}
}
}

  • +
  • -
  • 0

#2 K1noS

    Zaawansowany

  • Autor tematu
  • Użytkownik

Reputacja: -4
Nowy

  • Postów:90
  • GG:
  • Lokalizacja:Gdynia
Offline

Napisano 10.03.2012 12:48

refresh
  • +
  • -
  • 0

#3 Gość_deLL_*

  • Gość

Reputacja: 0

Offline

Napisano 10.03.2012 12:59

Sprawdź to, przez ściany dla VIPa:

Spoiler


lub w załączniku.

OK

12:58 - Powinno działać, sprawdź.

Załączone pliki


Użytkownik deLL edytował ten post 10.03.2012 13:05


#4 kapi10072

    Wszechpomocny

  • Użytkownik

Reputacja: 70
Pomocny

  • Postów:318
  • Steam:steam
  • Imię:Kacper
  • Lokalizacja:Polska
Offline

Napisano 10.03.2012 13:17

Łap

#include <amxmodx>
#include <hamsandwich>
#include <fun>
#include <cstrike>
#include <fakemeta>
#include <engine>
#include <fakemeta_util>

#define ADMIN_VIP ADMIN_LEVEL_H
#define SCOREATTRIB_NONE 0
#define SCOREATTRIB_DEAD (1<<0)
#define SCOREATTRIB_BOMB (1<<1)
#define SCOREATTRIB_VIP (1<<2)

new bool:moze_skoczyc[33];
new g_type, g_enabled, g_recieved, bool:g_showrecieved, g_hudmsg1, g_hudmsg2
new nick_gracza[32]
new cvar_motd, cvar_info_vip;

public plugin_init()
{
register_plugin("VIP", "1.0", "Screeaam..")

RegisterHam(Ham_Spawn, "player", "Spawned", 1);
register_event("DeathMsg", "DeathMsg", "a")
register_message(get_user_msgid("ScoreAttrib"), "MessageScoreAttrib");
register_forward(FM_CmdStart, "CmdStart");
register_clcmd("say /vip", "vip_bonusy")
register_event("Damage", "on_damage", "b", "2!0", "3=0", "4!0")
register_event("HLTV", "on_new_round", "a", "1=0", "2=0")

g_type = register_cvar("amx_bulletdamage","1");
g_recieved = register_cvar("amx_bulletdamage_recieved","1");

g_hudmsg1 = CreateHudSyncObj();
g_hudmsg2 = CreateHudSyncObj();

cvar_motd = register_cvar("vip_motd","1"); // pokazywac motd z info o vipach
cvar_info_vip = register_cvar("vip_info","1"); // pokazywac info gdy wchodzi vip ( przaychdozi VIP nick)
}
public MessageScoreAttrib(iMsgID, iDest, iReceiver)
{
new iPlayer = get_msg_arg_int(1);
if( is_user_connected(iPlayer) && (get_user_flags(iPlayer) & ADMIN_VIP))
{
set_msg_arg_int( 2, ARG_BYTE, is_user_alive(iPlayer) ? SCOREATTRIB_VIP : SCOREATTRIB_DEAD);
}
}
public Spawned(id)
{
if(!is_user_alive(id))
return PLUGIN_HANDLED;

if(get_user_flags(id) & ADMIN_VIP)
{
set_user_health(id, 115);

if(cs_get_user_team(id) == CS_TEAM_CT)
give_item(id, "item_thighpack");

set_user_armor(id, 100);
moze_skoczyc[id] = true;
}
return PLUGIN_CONTINUE;
}
public DeathMsg()
{
new kid = read_data(1);
new hs = read_data(3);

if(is_user_connected(kid) && get_user_flags(kid) & ADMIN_VIP)
{
if(cs_get_user_money(kid) > 16000) cs_set_user_money(kid, 16000, 1);

if(hs) set_user_frags(kid, get_user_frags(kid) + 2);

message_begin(MSG_ALL,85)
write_byte(kid)
write_short(get_user_frags(kid))
write_short(get_user_deaths(kid))
write_short(0)
write_short(get_user_team(kid))
message_end()
}
}
public client_disconnect(id)
{
new info_vip_con = get_pcvar_num(cvar_info_vip)
if(info_vip_con == 1)
{
if (get_user_flags(id) & ADMIN_VIP)
{
get_user_name(id, nick_gracza, 32);
set_hudmessage(0, 255, 0, 0.04, 0.28, 0, 6.0, 12.0)
show_hudmessage(0, "Odchodzi VIP %s", nick_gracza)
}
}
}
public client_authorized(id)
{
new info_vip_con = get_pcvar_num(cvar_info_vip)
if(info_vip_con == 1)
{
if (get_user_flags(id) & ADMIN_VIP)
{
get_user_name(id, nick_gracza, 32);
set_hudmessage(255, 0, 0, 0.04, 0.28, 0, 6.0, 12.0)
show_hudmessage(0, "Przychodz VIP %s", nick_gracza)
}

}
}
public CmdStart(id, uc_handle)
{
if(!is_user_alive(id))
return FMRES_IGNORED;

new flags = pev(id, pev_flags);

if((get_uc(uc_handle, UC_Buttons) & IN_JUMP) && !(flags & FL_ONGROUND) && !(pev(id, pev_oldbuttons) & IN_JUMP) && moze_skoczyc[id] && (get_user_flags(id) & ADMIN_VIP))
{
moze_skoczyc[id] = false;
new Float:velocity[3];
pev(id, pev_velocity,velocity);
velocity[2] = random_float(265.0,285.0);
set_pev(id, pev_velocity,velocity);
}
else if(flags & FL_ONGROUND)
moze_skoczyc[id] = true;

return FMRES_IGNORED;
}
public CurWeapon(id)
{
if(get_user_flags(id) & ADMIN_VIP)
set_user_maxspeed(id, get_user_maxspeed(id) + 110.0);

return PLUGIN_CONTINUE;
}

public vip_bonusy(id)
{
new motd_s = get_pcvar_num(cvar_motd)

if (motd_s == 1)
show_motd(id, "vip.txt", "Vip Info")
}

public on_new_round()
{
g_enabled = get_pcvar_num(g_type)
if(get_pcvar_num(g_recieved)) g_showrecieved = true
}

public on_damage(id)
{
if(get_user_flags(id) & ADMIN_VIP)
{
if(g_enabled)
{
static attacker; attacker = get_user_attacker(id)
static damage; damage = read_data(2)
if(g_showrecieved)
{
set_hudmessage(255, 0, 0, 0.45, 0.50, 2, 0.1, 4.0, 0.1, 0.1, -1)
ShowSyncHudMsg(id, g_hudmsg2, "%i^n", damage)
}
if(is_user_connected(attacker))
{
switch(g_enabled)
{
case 1:
{
set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, -1)
ShowSyncHudMsg(attacker, g_hudmsg1, "%i^n", damage)
}
case 2:
{
if(fm_is_ent_visible(attacker,id))
{
set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, -1)
ShowSyncHudMsg(attacker, g_hudmsg1, "%i^n", damage)
}
}
}
}
}
}
}

  • +
  • -
  • 0

Dołączona grafika
Najlepszy serwer TeamPlay w Polsce !
Pomogłem, wejdź ;)
Zapraszam na BHZ-Game.pl
Bo nie liczą się fragi tylko dobra atmosfera ;D


#5 Gość_deLL_*

  • Gość

Reputacja: 0

Offline

Napisano 10.03.2012 13:22

Łap


Co ma robić Twój kod?

#6 K1noS

    Zaawansowany

  • Autor tematu
  • Użytkownik

Reputacja: -4
Nowy

  • Postów:90
  • GG:
  • Lokalizacja:Gdynia
Offline

Napisano 10.03.2012 15:42

dalem dell to na serwer . zabijam kogos przez drzwi ale dalej nie widac obrazen jakie zadałem ;/

kapi twoj tez nie działa ;/

Użytkownik K1noS edytował ten post 10.03.2012 15:47

  • +
  • -
  • 0

#7 kapi10072

    Wszechpomocny

  • Użytkownik

Reputacja: 70
Pomocny

  • Postów:318
  • Steam:steam
  • Imię:Kacper
  • Lokalizacja:Polska
Offline

Napisano 10.03.2012 16:28

amx_bulletdamage_recieved "2"
Do amxx.cfg :P
  • +
  • -
  • 0

Dołączona grafika
Najlepszy serwer TeamPlay w Polsce !
Pomogłem, wejdź ;)
Zapraszam na BHZ-Game.pl
Bo nie liczą się fragi tylko dobra atmosfera ;D


#8 K1noS

    Zaawansowany

  • Autor tematu
  • Użytkownik

Reputacja: -4
Nowy

  • Postów:90
  • GG:
  • Lokalizacja:Gdynia
Offline

Napisano 10.03.2012 20:12

dalem i nadal nic
  • +
  • -
  • 0

#9 K1noS

    Zaawansowany

  • Autor tematu
  • Użytkownik

Reputacja: -4
Nowy

  • Postów:90
  • GG:
  • Lokalizacja:Gdynia
Offline

Napisano 11.03.2012 09:53

no nie działa ;f proszę o pomoc
  • +
  • -
  • 0

#10 K1noS

    Zaawansowany

  • Autor tematu
  • Użytkownik

Reputacja: -4
Nowy

  • Postów:90
  • GG:
  • Lokalizacja:Gdynia
Offline

Napisano 14.03.2012 17:25

rr
  • +
  • -
  • 0





Również z jednym lub większą ilością słów kluczowych: Nowy Plugin

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

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