←  Problemy

AMXX.pl: Support AMX Mod X i SourceMod

»

Nie dodaje broni / hp / speeda

Zablokowany

  • +
  • -
Gufinsky - zdjęcie Gufinsky 20.12.2010

Witam. Napisałem tak na szybko dla kolegi vipa na flagę T. Lecz gdy wgra on go na serwer nikt z flagą T nie dostaje podanych rzeczy w pluginie ;x

Kod:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fun>


#define PLUGIN "VIP PaintBall"
#define VERSION "1.0"
#define AUTHOR "Nup"


public  plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
}
public event_spawn(id)
{
	if(get_user_flags(id) & ADMIN_LEVEL_H) 
{
		give_item(id, "weapon_hegrenade");
		give_item(id, "weapon_p90");
		set_user_health(id, 130);
		set_user_maxspeed(id, 340.0)
	}
}


A gdy wpisze /vips to pokazują się osoby z flagami T. Więc dlaczego plugin nie dodaje osobom z flaga he, p90, 130hp, speeda?

Jeśli można to czy da się to jakoś zmodyfikować aby te rzeczy dodawały się co rundę?
Odpowiedz

  • +
  • -
DarkGL - zdjęcie DarkGL 20.12.2010


#include <amxmisc>
#include <fun>
#include <hamsandwich>


#define PLUGIN "VIP PaintBall"
#define VERSION "1.0"
#define AUTHOR "Nup"


public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Spawn,"player","spawned",0)
}
public spawned(this){
if(!is_user_alive(this)){
return HAM_IGNORED;
}
if(get_user_flags(this) & ADMIN_LEVEL_H)
{
give_item(this, "weapon_hegrenade");
give_item(this, "weapon_p90");
set_user_health(this, 130);
set_user_maxspeed(this, 340.0)
}
return HAM_IGNORED;
}
Odpowiedz

  • +
  • -
Gufinsky - zdjęcie Gufinsky 20.12.2010

Hmmm.. Nadal nie działa, nic nie daje, ani speeda ani hp ani broni ani HE.
Odpowiedz

  • +
  • -
;(( - zdjęcie ;(( 20.12.2010

Może :D

#include <amxmisc>
#include <fun>
#include <hamsandwich>


#define PLUGIN "VIP PaintBall"
#define VERSION "1.0"
#define AUTHOR "Nup"


public  plugin_init() {
        register_plugin(PLUGIN, VERSION, AUTHOR)
        RegisterHam(Ham_Spawn,"player","spawned",0)
}
public spawned(id){
        if(!is_user_alive(id)){
                return HAM_IGNORED;
        }
        if(get_user_flags(id) & ADMIN_LEVEL_H) 
        {
                give_item(id, "weapon_hegrenade");
                give_item(id, "weapon_p90");
                set_user_health(id, 130);
                set_user_maxspeed(id, 340.0)
        }
        return HAM_IGNORED;
}
Odpowiedz

  • +
  • -
Gufinsky - zdjęcie Gufinsky 20.12.2010

Wersja od DMNq. coś tam działa. W 1 rundzie nie dostałem nic. W 2 rundzie dostałem p90 i he. A co z hp i speedem? :X A i można zrobić tak, że p90 od razu z full ammo?

Jeśli nie da się zmienić żeby to działało, to proszę o napisanie pluginu, który graczowi o fladze T daje:

- he w każdej rundzie
- 130 hp
- 340 speed
- p90
Odpowiedz
Zablokowany