Raised This Month: $ Target: $400
 0% 

error in my plugin, please help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
skulldiggers
Member
Join Date: Sep 2004
Old 12-29-2004 , 00:04   error in my plugin, please help
Reply With Quote #1

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

new rdys=0, rdy[32], inmatch=0, needed=10,ativo=0

public ready_to_match(id)
{
       new kName[32]
       get_user_name(id,kName,31)

       if(!ativo)
       {
       if(!inmatch)
       {
       if(!rdy[id])
       {
                rdy[id]=1
                rdys++
       }
       else
       {
                client_print(id,print_chat,"** Voce Ja deu ready! **")
                return PLUGIN_CONTINUE
       }

       if(rdys>=needed)
       {
       inmatch=1
       set_task(5.0, "start_the_match")
       }
       }
       }
       else
       {
       client_print(id,print_chat,"** CPL MATCH ESTA DESATIVADA **")
       }
       return PLUGIN_CONTINUE
}

public restart_round(time[])
{
  server_cmd("sv_restartround %s",time)
  return PLUGIN_CONTINUE
}

public restart_msg2()
{
        new host[32]
        get_cvar_string("hostname",host,32)
        client_print(0,print_chat,"%s : [--- LIVE ON NEXT RESTART ---]", host)
        return PLUGIN_CONTINUE
}

public restart_msg3()
{
        new host[32]
        get_cvar_string("hostname",host,32)
        client_print(0,print_chat,"%s : [--- LIVE! LIVE! LIVE! ---]", host)
        return PLUGIN_CONTINUE
}

public say_algo(msg[])
{
        new host[32]
        get_cvar_string("hostname",host,32)
        client_print(0,print_chat,"%s : %s", host, msg)
        return PLUGIN_CONTINUE
}

public start_the_match()
{
        new cfgfile[64]
        new host[32]
        get_cvar_string("hostname",host,32)
        server_cmd("exec %s", cfgfile)
        client_print(0,print_chat,"%s : [--- LIVE IN 3 RESTARTS ---]", host)
        restart_round("1")
        set_task(1.0, "restart_round",0,"1",2)
        set_task(1.1, "restart_msg2")
        set_task(2.0, "restart_round",0,"10",2)
        set_task(2.1, "restart_msg3")
}

public match_info(id)
{
        client_print(id,print_chat,"** Faltam %s dizer !rdy para comecar a partida **", needed-rdys)
        return PLUGIN_CONTINUE
}

public amx_startmatch(id,level,cid)
{
    restart_round("1")
    set_task(1.5, "restart_round",0,"1",2)
    set_task(3.0, "restart_round",0,"5",2)
    set_task(3.0, "last_rr")
    set_task(9.0, "lmessage")
    return PLUGIN_HANDLED
}

public amx_match(id,level,cid)
{
	if (!cmd_access(id, level, cid, 1)) return PLUGIN_HANDLED

	new type[32]
	new need[64]
	read_argv(1, type, 32)
	read_args(need, 64)
	if (equal(type,"0")) {
	ativo=0
	server_cmd("exec 4fun.cfg")
	return PLUGIN_HANDLED
	}
	if (equal(type,"1")) {
	ativo=1
	needed=need
	server_cmd("exec cpl.cfg")
	return PLUGIN_HANDLED
	}
	if (equal(type,"2")) {
	ativo=1
	needed=need
	server_cmd("exec cplot.cfg")
	return PLUGIN_HANDLED
	}
    return PLUGIN_HANDLED
}


public plugin_init()
{
        register_plugin("Cpl Match auto prepare","1.0a","Tr4NInG")
        register_clcmd( "say !rdy", "ready_to_match", 0, "Ready to match" )
        register_clcmd( "say !info", "match_info", 0, "Info of number of readys" )
        register_concmd("amx_match", "amx_match",ADMIN_MAP,"Start or stop a match in server")
}
error:

must be assigned an array

lines: 115.116,121,122



HELP
__________________
Headshot rules...
skulldiggers is offline
 



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 19:28.


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