Eroare Plugin

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Post Reply
Arminvan
Membru, skill +1
Membru, skill +1
Posts: 212
Joined: 22 Jan 2012, 20:23
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 15 times
Been thanked: 15 times
Contact:

31 Mar 2012, 20:20

Salut. Imi da urmatoarea eroare la plugin:

Code: Select all

L 03/31/2012 - 16:07:56: [AMXX] Displaying debug trace (plugin "respawn.amxx")
L 03/31/2012 - 16:07:56: [AMXX] Run time error 4: index out of bounds 
L 03/31/2012 - 16:07:56: [AMXX]    [0] respawn.sma::eventDeath (line 31)
Sursa:

Code: Select all

#include <amxmodx>
#include <cstrike>
#include <hamsandwich>

#define MAXPLAYERS 31
#define TASK_RESPAWN 7124

new g_iRespawns[MAXPLAYERS + 1] = {0, ...};

new g_pCvar_Time;
new g_pCvar_Respawns;

public plugin_init()
{
    register_plugin("DeathRunRespawn", "0.1", "Someone over the rainbow");
    
    register_event("DeathMsg", "eventDeath", "a");
    register_event("HLTV", "eventNewRound", "a", "1=0", "2=0");
    
    RegisterHam(Ham_Spawn, "player", "FwdPlayerSpawn_Post", true);
    
    g_pCvar_Time = register_cvar("spawn_delay", "1.0");
    g_pCvar_Respawns = register_cvar("spawn_times", "10");
}

public eventDeath()
{
    new iVictim = read_data(2);
    new Float:flTime = get_pcvar_float(g_pCvar_Time);

    if( g_iRespawns[iVictim] < get_pcvar_num(g_pCvar_Respawns) )
    {
        client_print(iVictim, print_chat, "You have only 10 respawns / round !", flTime);
        set_task(flTime, "Respawn", iVictim + TASK_RESPAWN);
    }
    else
    {
        remove_task(iVictim + TASK_RESPAWN);
        
        client_print(iVictim, print_chat, "You have respawned the maximum amount of times this round.");
    }
}

public eventNewRound()
{
    new iPlayers[32], iNum, id;
    get_players(iPlayers, iNum);
    
    for( new i = 0; i < iNum; i++ )
    {
        id = iPlayers[i];
        
        if( is_user_connected(id) )
        {
            g_iRespawns[id] = 0;
        }
    }
}

public FwdPlayerSpawn_Post(id)
{
    if( is_user_alive(id) ) 
    {
        remove_task(id + TASK_RESPAWN);
    }
}

public client_disconnect(id)
{
    remove_task(id + TASK_RESPAWN);
}

public Respawn(id)
{
    id -= TASK_RESPAWN;
    ExecuteHamB(Ham_CS_RoundRespawn, id);
    g_iRespawns[id]++;
}
Ma ajuta careva sa scap de eroare? Dau multumesc :-S
Vand orice licenta sub forma de gift la pret redus. PM pentru detalii.
RoyalServer
User avatar
S3ekEr^
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 3475
Joined: 06 Dec 2009, 12:47
Detinator Steam: Nu
Reputatie: Nume anterior: The Seeker , Reptyle
Fost Scripter
Fost super moderator
Utilizator neserios ( tepar )
Has thanked: 117 times
Been thanked: 329 times

01 Apr 2012, 10:30

Incearca-l pe acesta pentru respawn :)
| Afiseaza codul
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

#define VERSION "0.0.1"
#define PLUGIN "Respawn"

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, "Author")

	RegisterHam(Ham_Killed, "player", "Ham_CBasePlayer_Killed_Post", true)
}

public Ham_CBasePlayer_Killed_Post( id )
{
	set_pev(id, pev_deadflag, DEAD_RESPAWNABLE)
}
Arminvan
Membru, skill +1
Membru, skill +1
Posts: 212
Joined: 22 Jan 2012, 20:23
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 15 times
Been thanked: 15 times
Contact:

01 Apr 2012, 14:42

Ce ai postat tu face respawn mereu. Eu vreau sa aiba o limita de x respawnuri / runda :) Am incercat si altele si tot apar buguri
Vand orice licenta sub forma de gift la pret redus. PM pentru detalii.
User avatar
tweky
Fost moderator
Fost moderator
Posts: 2707
Joined: 22 Jun 2009, 01:54
Detinator Steam: Da
CS Status: Inactiv
Detinator server CS: Da
SteamID: twekymihai
Reputatie: Fost eXtream Mod
Nume anterior: Mihaita
Fost Membru Club eXtreamCS
Location: Ilfov
Has thanked: 127 times
Been thanked: 173 times

01 Apr 2012, 16:41

Poftim
Respawn.sma | Afiseaza codul
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>

#define MAXPLAYERS 31
#define TASK_RESPAWN 7124

new g_iRespawns[MAXPLAYERS + 1] = {0, ...};

new g_pCvar_Time;
new g_pCvar_Respawns;

public plugin_init()
{
    register_plugin("DeathRunRespawn", "0.1", "Someone over the rainbow");
   
    register_event("DeathMsg", "eventDeath", "a");
    register_event("HLTV", "eventNewRound", "a", "1=0", "2=0");
   
    RegisterHam(Ham_Spawn, "player", "FwdPlayerSpawn_Post", true);
   
    g_pCvar_Time = register_cvar("spawn_delay", "1.0");
    g_pCvar_Respawns = register_cvar("spawn_times", "10");
}

public eventDeath()
{
    new iVictim = read_data(2);
    new Float:flTime = get_pcvar_float(g_pCvar_Time);

	if (1 > iVictim || MAXPLAYERS + 1 < iVictim)
		return;
	
    if( g_iRespawns[iVictim] < get_pcvar_num(g_pCvar_Respawns) )
    {
        client_print(iVictim, print_chat, "You have only 10 respawns / round !", flTime);
        set_task(flTime, "Respawn", iVictim + TASK_RESPAWN);
    }
    else
    {
        remove_task(iVictim + TASK_RESPAWN);
       
        client_print(iVictim, print_chat, "You have respawned the maximum amount of times this round.");
    }
}

public eventNewRound()
{
    new iPlayers[32], iNum, id;
    get_players(iPlayers, iNum);
   
    for( new i = 0; i < iNum; i++ )
    {
        id = iPlayers;
       
        if( is_user_connected(id) )
        {
            g_iRespawns[id] = 0;
        }
    }
}

public FwdPlayerSpawn_Post(id)
{
    if( is_user_alive(id) )
    {
        remove_task(id + TASK_RESPAWN);
    }
}

public client_disconnect(id)
{
    remove_task(id + TASK_RESPAWN);
}

public Respawn(id)
{
    id -= TASK_RESPAWN;
    ExecuteHamB(Ham_CS_RoundRespawn, id);
    g_iRespawns[id]++;
}
my website
:hand_over_mouth: :ghosts:

1. vevios.ro

2. minios.ro
Arminvan
Membru, skill +1
Membru, skill +1
Posts: 212
Joined: 22 Jan 2012, 20:23
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 15 times
Been thanked: 15 times
Contact:

01 Apr 2012, 16:47

Ce anume ai modificat?
Vand orice licenta sub forma de gift la pret redus. PM pentru detalii.
User avatar
tweky
Fost moderator
Fost moderator
Posts: 2707
Joined: 22 Jun 2009, 01:54
Detinator Steam: Da
CS Status: Inactiv
Detinator server CS: Da
SteamID: twekymihai
Reputatie: Fost eXtream Mod
Nume anterior: Mihaita
Fost Membru Club eXtreamCS
Location: Ilfov
Has thanked: 127 times
Been thanked: 173 times

01 Apr 2012, 16:52

e, am modificat ceva.. cred ca autorul acestui plugin era beat cand l-a facut ;;) , incearca si vezi daca e bun :)
my website
:hand_over_mouth: :ghosts:

1. vevios.ro

2. minios.ro
Arminvan
Membru, skill +1
Membru, skill +1
Posts: 212
Joined: 22 Jan 2012, 20:23
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 15 times
Been thanked: 15 times
Contact:

01 Apr 2012, 16:54

O sa-l testez mai tarziu. Acum am bagat pluginul dat de S3eker si vad ca nu imi da eroare. Revin cu raspuns dupa ce il testez.
Vand orice licenta sub forma de gift la pret redus. PM pentru detalii.
Arminvan
Membru, skill +1
Membru, skill +1
Posts: 212
Joined: 22 Jan 2012, 20:23
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 15 times
Been thanked: 15 times
Contact:

01 Apr 2012, 18:46

A picat serverul :)) Segmentation Fault
Vand orice licenta sub forma de gift la pret redus. PM pentru detalii.
User avatar
S3ekEr^
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 3475
Joined: 06 Dec 2009, 12:47
Detinator Steam: Nu
Reputatie: Nume anterior: The Seeker , Reptyle
Fost Scripter
Fost super moderator
Utilizator neserios ( tepar )
Has thanked: 117 times
Been thanked: 329 times

01 Apr 2012, 18:58

Arminvan wrote:A picat serverul :)) Segmentation Fault
Segmentation fault nu este de la pluginul meu

http://www.extreamcs.com/forum/diverse/ ... 22840.html
Arminvan
Membru, skill +1
Membru, skill +1
Posts: 212
Joined: 22 Jan 2012, 20:23
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 15 times
Been thanked: 15 times
Contact:

01 Apr 2012, 19:52

Nu de la al tau. De la pluginu lui Tweky si eroarea a aparut dupa ce am bagat pluginul. Deci e de la el sau intra in conflict cu altul. L-am scos. Al tau merge bine doar e o problema. Cand mori mai multi intr-un loc, jos nu dispar cadavrele si se cam face lag
Vand orice licenta sub forma de gift la pret redus. PM pentru detalii.
User avatar
S3ekEr^
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 3475
Joined: 06 Dec 2009, 12:47
Detinator Steam: Nu
Reputatie: Nume anterior: The Seeker , Reptyle
Fost Scripter
Fost super moderator
Utilizator neserios ( tepar )
Has thanked: 117 times
Been thanked: 329 times

01 Apr 2012, 20:02

Arminvan wrote:Nu de la al tau. De la pluginu lui Tweky si eroarea a aparut dupa ce am bagat pluginul. Deci e de la el sau intra in conflict cu altul. L-am scos. Al tau merge bine doar e o problema. Cand mori mai multi intr-un loc, jos nu dispar cadavrele si se cam face lag
Deobicei nu raman toate cadavrele , nu-i de la plugin :)
Arminvan
Membru, skill +1
Membru, skill +1
Posts: 212
Joined: 22 Jan 2012, 20:23
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 15 times
Been thanked: 15 times
Contact:

01 Apr 2012, 20:13

Nu ramaneau cu pluginu care avea bug. Cu asta raman toate. Sincer si eu am ramas uimit. Am setat cl_corpsestay 0. Sper sa rezolve problema
Vand orice licenta sub forma de gift la pret redus. PM pentru detalii.
Post Reply

Return to “Cereri”

  • Information