Raised This Month: $ Target: $400
 0% 

Anyone can check this code if it's correct?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
LJC
Member
Join Date: Jul 2014
Old 11-14-2014 , 16:26   Anyone can check this code if it's correct?
Reply With Quote #1

Hi, somehow I think that this my "home-made" plugin causes this error on my server:

sz_getspace: overflow on

Can anyone check if this code is written correctly and doesn't spam any commands to the client? Thanks.


Code:
#include <amxmodx>
#include <amxmisc>

new num
new map[32]
new pCvar_enableswap
new pCvar_swapround
new pCvar_boost
new pCvar_hidetime

public plugin_init()
{
	register_plugin("PapildomiLJC", "1.2", "arbata");
    get_mapname(map, charsmax(map)) 
	pCvar_enableswap = register_cvar("mp_swapspawns", "0")
	pCvar_swapround = register_cvar("mp_swapround", "0")
	pCvar_boost = register_cvar("hns_semiclip", "0")
	pCvar_hidetime = register_cvar("hns_hidetime", "20")
	set_task(3.0, "hns_mod")
	set_task(8.0, "check_random")
}

public check_random()
{
	num = random_num(5, 10);
	set_pcvar_num(pCvar_enableswap, 2)
	set_pcvar_num(pCvar_swapround, num)
}

public hns_mod()
{
	if(containi(map, "hns_") != -1) {     
        set_pcvar_num(pCvar_boost, 1);
		set_pcvar_num(pCvar_hidetime, 10);
    }
	else if(containi(map, "rayish_") != -1) {     
        set_pcvar_num(pCvar_boost, 1);
		set_pcvar_num(pCvar_hidetime, 10);
    }
	else if(containi(map, "c21_") != -1) {     
        set_pcvar_num(pCvar_boost, 1);
		set_pcvar_num(pCvar_hidetime, 10);
    } 
}
LJC is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:40.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode