←  Problemy

AMXX.pl: Support AMX Mod X i SourceMod

»

Mała poprawka

Zablokowany

  • +
  • -
loleN - zdjęcie loleN 07.03.2009

#include <amxmodx>
#include <amxmisc>
#include <fun> 
#include <cstrike>
#include <fakemeta>
#include <hamsandwich>
#include <cstrike>


#define PLUGIN "DeathRun Extras"
#define VERSION "1.0"
#define AUTHOR "loleN~"

new bool: uzyl[33] = false

public plugin_init() 
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_event("HLTV", "wyczysc", "a", "1=0", "2=0");
    register_clcmd("say /heal", "heal")
    register_clcmd("say /bron","usp")
    register_clcmd("say /usp","usp")
    register_clcmd("say_team /bron","usp")
    register_clcmd("say_team /usp","usp")
    RegisterHam(Ham_Spawn, "player", "starthp", 1)
    register_clcmd("say /kill","kill") 
    log_amx("DeathRun Extras v%s by loleN[www.pjs-cs.eu] zostal wlaczony.", VERSION)
}
public wyczysc()
{
    new players[32], pnum
    get_players(players, pnum);
    uzyl[players[pnum]] = false
}

public heal(id)
{
new CsTeams:userTeam = cs_get_user_team(id)

switch(CsTeams:userTeam) 
{
    case 2: 
        {
        set_user_health (id, 50) 
        }
    case 1: 
        {
        set_user_health (id, 100) 
        }
}
}

public usp(id)
{
new CsTeams:userTeam = cs_get_user_team(id)

switch(CsTeams:userTeam) 
{
    case 2: 
        {
        give_item(id, "weapon_usp") 
        give_item(id, "ammo_45acp") 
        give_item(id, "ammo_45acp") 
        give_item(id, "ammo_45acp") 
        give_item(id, "ammo_45acp") 
        give_item(id, "ammo_45acp") 
        give_item(id, "ammo_45acp") 
        give_item(id, "ammo_45acp") 
        }
    case 1: 
        {
        client_print(id, print_chat,"Jestes terrorysta nie mozesz posiadac broni!")
        }
}
}
public starthp(id)
{
new CsTeams:userTeam = cs_get_user_team(id)

switch(CsTeams:userTeam) 
{
    case 2: 
        {
        set_pev(id, pev_health, 50.0) 
        }
    case 1: 
        {
        set_user_health (id, 100) 
        }
}
}
public kill(player)
{
      user_silentkill(player)
}

Może ktoś mi poprawić, plugin działa ale są błędy.
Odpowiedz

  • +
  • -
bakul. <3 - zdjęcie bakul. <3 07.03.2009

To powiedz jakie są te błędy? Będzie nam łatwiej.
Odpowiedz

  • +
  • -
loleN - zdjęcie loleN 07.03.2009

L 03/07/2009 - 02:11:29: Start of error session.

L 03/07/2009 - 02:11:29: Info (map "de_nuke") (file "addons/amxmodx/logs/error_20090307.log")

L 03/07/2009 - 02:11:29: [CSTRIKE] Invalid player 1

L 03/07/2009 - 02:11:29: [AMXX] Displaying debug trace (plugin "drex.amxx")

L 03/07/2009 - 02:11:29: [AMXX] Run time error 10: native error (native "cs_get_user_team")

L 03/07/2009 - 02:11:29: [AMXX]    [0] drex.sma::starthp (line 78)

Odpowiedz

  • +
  • -
bakul. <3 - zdjęcie bakul. <3 07.03.2009

L 03/07/2009 - 02:11:29: [AMXX] Displaying debug trace (plugin "drex.amxx")
Masz taki plugin jak drex.amxx?
Odpowiedz

  • +
  • -
mgr inż. Pavulon - zdjęcie mgr inż. Pavulon 07.03.2009

Kod:
L 03/07/2009 - 02:11:29: [AMXX] Displaying debug trace (plugin "drex.amxx")

Masz taki plugin jak drex.amxx?


omfg, hahaha :lol:

no nie wiem czy jesteś autorem tego pluginu(chociaż podpisałeś się pod nim) że poprawić go nie potrafisz, ale spróbuj tego:
#include <amxmodx>
#include <fun>
#include <cstrike>
#include <fakemeta>
#include <hamsandwich>


#define PLUGIN "DeathRun Extras"
#define VERSION "1.0"
#define AUTHOR "loleN~"

new bool: uzyl[33] = false

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_event("HLTV", "wyczysc", "a", "1=0", "2=0");
	register_clcmd("say /heal", "heal")
	register_clcmd("say /bron","usp")
	register_clcmd("say /usp","usp")
	register_clcmd("say_team /bron","usp")
	register_clcmd("say_team /usp","usp")
	RegisterHam(Ham_Spawn, "player", "starthp", 1)
	register_clcmd("say /kill","kill")
	log_amx("DeathRun Extras v%s by loleN[www.pjs-cs.eu] zostal wlaczony.", VERSION)
}
public wyczysc()
{
	new players[32], pnum
	get_players(players, pnum);
	uzyl[players[pnum]] = false
}

public heal(id)
{
	new CsTeams:userTeam = cs_get_user_team(id)
	
	switch(CsTeams:userTeam)
	{
		case 2:
		{
			set_user_health (id, 50)
		}
		case 1:
		{
			set_user_health (id, 100)
		}
	}
}

public usp(id)
{
	new CsTeams:userTeam = cs_get_user_team(id)
	
	switch(CsTeams:userTeam)
	{
		case 2:
		{
			give_item(id, "weapon_usp")
			give_item(id, "ammo_45acp")
			give_item(id, "ammo_45acp")
			give_item(id, "ammo_45acp")
			give_item(id, "ammo_45acp")
			give_item(id, "ammo_45acp")
			give_item(id, "ammo_45acp")
			give_item(id, "ammo_45acp")
		}
		case 1:
		{
			client_print(id, print_chat,"Jestes terrorysta nie mozesz posiadac broni!")
		}
	}
}
public starthp(id)
{
	if (pev_valid(id))
	{
		new CsTeams:userTeam = cs_get_user_team(id)
		
		switch(CsTeams:userTeam)
		{
			case 2:
			{
				set_pev(id, pev_health, 50.0)
			}
			case 1:
			{
				set_user_health (id, 100)
			}
		}
	}
}
public kill(player)
{
	user_silentkill(player)
}
Odpowiedz

  • +
  • -
loleN - zdjęcie loleN 07.03.2009

Napisałem go na tutach z innych stron.

@Edit
Dalej to samo!
L 03/07/2009 - 14:43:05: Start of error session.
L 03/07/2009 - 14:43:05: Info (map "de_cbble") (file "addons/amxmodx/logs/error_20090307.log")
L 03/07/2009 - 14:43:05: [CSTRIKE] Invalid player 1
L 03/07/2009 - 14:43:06: [AMXX] Displaying debug trace (plugin "drex.amxx")
L 03/07/2009 - 14:43:06: [AMXX] Run time error 10: native error (native "cs_get_user_team")
L 03/07/2009 - 14:43:06: [AMXX]    [0] drex.sma::starthp (line 78)
Odpowiedz

  • +
  • -
Miczu - zdjęcie Miczu 07.03.2009

Zamiast cstrike uzyj...hmm... fakemeta?

new userTeam = pev(id,pev_team);

Powinno dac 1 dla tt i 2 dla ct 0 dla spec czy cos
Odpowiedz

  • +
  • -
mgr inż. Pavulon - zdjęcie mgr inż. Pavulon 07.03.2009

Ta funkcja wyczyść nie do końca jest raczej taka jak być powinna.
Spróbuj może tego:
#include <amxmodx>
#include <fun>
#include <fakemeta>
#include <hamsandwich>

#define PLUGIN "DeathRun Extras"
#define VERSION "1.0"
#define AUTHOR "loleN~"

new bool: uzyl[33] = false

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_event("HLTV", "wyczysc", "a", "1=0", "2=0");
	register_clcmd("say /heal", "heal")
	register_clcmd("say /bron","usp")
	register_clcmd("say /usp","usp")
	register_clcmd("say_team /bron","usp")
	register_clcmd("say_team /usp","usp")
	RegisterHam(Ham_Spawn, "player", "starthp", 1)
	register_clcmd("say /kill","kill")
	log_amx("DeathRun Extras v%s by loleN[www.pjs-cs.eu] zostal wlaczony.", VERSION)
}
public wyczysc()
{
	new players[32], pnum
	get_players(players, pnum);
	for (new i; i<pnum; i++)
		uzyl[players[i]] = false
}

public heal(id)
{
	new userTeam = get_user_team(id)
	
	switch(userTeam)
	{
		case 1:
		{
			set_user_health (id, 50)
		}
		case 2:
		{
			set_user_health (id, 100)
		}
	}
}

public usp(id)
{
	new userTeam = get_user_team(id)
	
	switch(userTeam)
	{
		case 1:
		{
			give_item(id, "weapon_usp")
			give_item(id, "ammo_45acp")
			give_item(id, "ammo_45acp")
			give_item(id, "ammo_45acp")
			give_item(id, "ammo_45acp")
			give_item(id, "ammo_45acp")
			give_item(id, "ammo_45acp")
			give_item(id, "ammo_45acp")
		}
		case 2:
		{
			client_print(id, print_chat,"Jestes terrorysta nie mozesz posiadac broni!")
		}
	}
}
public starthp(id)
{
	new userTeam = get_user_team(id)
	
	switch(userTeam)
	{
		case 1:
		{
			set_pev(id, pev_health, 50.0)
		}
		case 2:
		{
			set_user_health (id, 100)
		}
	}
}
public kill(player)
{
	user_silentkill(player)
}
Odpowiedz

  • +
  • -
loleN - zdjęcie loleN 07.03.2009

okk działa tylko literki trzeba przestawić :D
Odpowiedz

  • +
  • -
mgr inż. Pavulon - zdjęcie mgr inż. Pavulon 07.03.2009

okk działa tylko literki trzeba przestawić :D

jakie znów literki ?
Odpowiedz

  • +
  • -
loleN - zdjęcie loleN 07.03.2009

case 2 dać na 1, a case 1 przestawić na 2 i wtedy było okk
Odpowiedz
Zablokowany