Raised This Month: $ Target: $400
 0% 

Match Start Plugin Error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
cevaps
Member
Join Date: Apr 2008
Location: Turkiye
Old 01-23-2009 , 14:39   Match Start Plugin Error
Reply With Quote #1

Hi, i tried to edit http://forums.alliedmods.net/showpos...2&postcount=25 plugin to make an easy match plugin.

when i type .baslat it'll restart 3-3-5 and go. when i type .ayarlar it'll load match cfg, .taktik is tactic time and .uzatma is when teams get tie at 15-15 to play 3 more matches.

but, when i try to compile, it gives that error

Quote:
C:\Games\HALF-L~1\cstrike\addons\amx\examples\test.sma(61) : error 021: symbol a
lready defined: "server_cmd"
C:\Games\HALF-L~1\cstrike\addons\amx\examples\test.sma(142) : error 021: symbol
already defined: "server_cmd"
my code is this

Code:
#include <amxmodx>

public plugin_init() {
    register_plugin("Restart Game", "1.0", "xPaw");
    register_clcmd("say .baslat", "cmdBaslat");
    register_clcmd("say .ayarlar", "cmdAyarlar");
    register_clcmd("say .taktik", "cmdTaktik");
    register_clcmd("say .uzatma", "cmdUzatma");
}

public cmdBaslat( id ) {
    if ( !(get_user_flags(id) & ADMIN_KICK) )
        return PLUGIN_CONTINUE;

    set_hudmessage(0, 200, 0, -1.0, 0.40, 0, 6.0, 6.0, 0.1, 0.1, 1)
    show_hudmessage(0,"Mac 3 Restart'tan Sonra Basliyor!")
    set_task(1.0, "baslatayarlari")
    set_task(4.0, "rround3")
    set_task(7.0, "restartmesaj1")
    set_task(7.0, "rround3")
    set_task(10.0, "restartmesaj2")
    set_task(10.0, "rround5")
    set_task(15.0, "restartmesaj3")
    set_task(15.0, "restartmesaj4")

    return PLUGIN_HANDLED;
}

public rround3()
    server_cmd("sv_restartround 3");

public rround5()
    server_cmd("sv_restartround 5");

public restartmesaj1()
    client_print(0, print_chat, "[SiberOyuncu] 1. Restart - Her iki takimda hazir.");  

public restartmesaj2()
    client_print(0, print_chat, "[SiberOyuncu] 2. Restart - Mac basliyor...");  

public restartmesaj3()
    client_print(0, print_chat, "[SiberOyuncu] 3. Restart - Mac Basladi! Bol Sanslar!");  

public restartmesaj4()
    client_print(0, print_chat, "-- SiberOyuncu.com Online Gaming --");  

public baslatayarlari()
    set_task(1.0, "macayarlari");

public cmdAyarlar( id ) {
    if ( !(get_user_flags(id) & ADMIN_KICK) )
        return PLUGIN_CONTINUE;

    set_task(1.0, "macayarlari");

    return PLUGIN_HANDLED;
}

public macayarlari()
    server_cmd("mp_autokick 0");
    server_cmd("mp_autocrosshair 0");
    server_cmd("mp_autoteambalance 0");
    server_cmd("mp_buytime 0.25");
    server_cmd("mp_consistency 1");
    server_cmd("mp_c4timer 35");
    server_cmd("mp_flashlight 1");
    server_cmd("mp_forcechasecam 2");
    server_cmd("mp_forcecamera 2");
    server_cmd("mp_footsteps 1");
    server_cmd("mp_freezetime 8");
    server_cmd("mp_friendlyfire 1");
    server_cmd("mp_hostagepenalty 0");
    server_cmd("mp_limitteams 10");
    server_cmd("mp_logecho 1");
    server_cmd("mp_logdetail 3");
    server_cmd("mp_logfile 1");
    server_cmd("mp_logmessages 1");
    server_cmd("mp_roundtime 2.50");
    server_cmd("mp_timelimit 0");
    server_cmd("mp_tkpunish 0");
    server_cmd("sv_aim 0");
    server_cmd("sv_airaccelerate 10");
    server_cmd("sv_airmove 1");
    server_cmd("sv_allowdownload 0");
    server_cmd("sv_allowupload 0");
    server_cmd("sv_alltalk 0");
    server_cmd("sv_cheats 0");
    server_cmd("sv_clienttrace 1");
    server_cmd("sv_clipmode 0");
    server_cmd("sv_friction 4");
    server_cmd("sv_gravity 800");
    server_cmd("sv_lan_rate 25000");
    server_cmd("sv_maxrate 25000");
    server_cmd("sv_maxspeed 320");
    server_cmd("sv_maxunlag 0.5");
    server_cmd("sv_maxupdaterate 101");
    server_cmd("sv_minupdaterate 40");
    server_cmd("sv_minrate 10000");
    server_cmd("sv_proxies 1");
    server_cmd("sv_send_resources 1");
    server_cmd("sv_stepsize 18");
    server_cmd("sv_stopspeed 75");
    server_cmd("sv_unlag 1");
    server_cmd("sv_voiceenable 1");
    server_cmd("sv_unlagpush 0");
    server_cmd("sys_ticrate 10000");
    server_cmd("allow_spectators 1");
    server_cmd("decalfrequency 60");
    server_cmd("log on");
    server_cmd("pausable 0");

public cmdTaktik( id ) {
    if ( !(get_user_flags(id) & ADMIN_KICK) )
        return PLUGIN_CONTINUE;

    set_task(1.0, "taktikmesaj1");
    set_task(60.0, "sv_restart 1");
    server_cmd("mp_freezetime 60");
    server_cmd("sv_restart 1");


    return PLUGIN_HANDLED;
}

public taktikmesaj1()
    client_print(0, print_chat, "[SiberOyuncu] Taktik sureniz 1 dakikadir.");  


public cmdUzatma( id ) {
    if ( !(get_user_flags(id) & ADMIN_KICK) )
        return PLUGIN_CONTINUE;

    set_task(1.0, "macayarlari");
    set_task(2.0, "uzatmaayarlari");


    return PLUGIN_HANDLED;
}


public uzatmaayarlari()
    client_print(0, print_chat, "[SiberOyuncu] Uzatma ayarlari hazir."); 
    server_cmd("mp_startmoney 10000");
    server_cmd("sv_restart 1");
as you see, i know just server_cmd, client_print and set_task commands can someone tell me how can i fix the problem
? can't i use server_cmd 2 times in same command?

Last edited by cevaps; 01-23-2009 at 14:50.
cevaps is offline
Send a message via ICQ to cevaps Send a message via MSN to cevaps
L//
Senior Member
Join Date: Aug 2008
Location: Not found
Old 01-23-2009 , 14:51   Re: Match Start Plugin Error
Reply With Quote #2

The problem is missing the keys for opening and closing in 2 functions

Code:
#include <amxmodx>

public plugin_init() {
    register_plugin("Restart Game", "1.0", "xPaw");
    register_clcmd("say .baslat", "cmdBaslat");
    register_clcmd("say .ayarlar", "cmdAyarlar");
    register_clcmd("say .taktik", "cmdTaktik");
    register_clcmd("say .uzatma", "cmdUzatma");
}

public cmdBaslat( id ) {
    if ( !(get_user_flags(id) & ADMIN_KICK) )
        return PLUGIN_CONTINUE;

    set_hudmessage(0, 200, 0, -1.0, 0.40, 0, 6.0, 6.0, 0.1, 0.1, 1)
    show_hudmessage(0,"Mac 3 Restart'tan Sonra Basliyor!")
    set_task(1.0, "baslatayarlari")
    set_task(4.0, "rround3")
    set_task(7.0, "restartmesaj1")
    set_task(7.0, "rround3")
    set_task(10.0, "restartmesaj2")
    set_task(10.0, "rround5")
    set_task(15.0, "restartmesaj3")
    set_task(15.0, "restartmesaj4")

    return PLUGIN_HANDLED;
}

public rround3()
    server_cmd("sv_restartround 3");

public rround5()
    server_cmd("sv_restartround 5");

public restartmesaj1()
    client_print(0, print_chat, "[SiberOyuncu] 1. Restart - Her iki takimda hazir.");  

public restartmesaj2()
    client_print(0, print_chat, "[SiberOyuncu] 2. Restart - Mac basliyor...");  

public restartmesaj3()
    client_print(0, print_chat, "[SiberOyuncu] 3. Restart - Mac Basladi! Bol Sanslar!");  

public restartmesaj4()
    client_print(0, print_chat, "-- SiberOyuncu.com Online Gaming --");  

public baslatayarlari()
    set_task(1.0, "macayarlari");

public cmdAyarlar( id ) {
    if ( !(get_user_flags(id) & ADMIN_KICK) )
        return PLUGIN_CONTINUE;

    set_task(1.0, "macayarlari");

    return PLUGIN_HANDLED;
}

public macayarlari()
{
    server_cmd("mp_autokick 0");
    server_cmd("mp_autocrosshair 0");
    server_cmd("mp_autoteambalance 0");
    server_cmd("mp_buytime 0.25");
    server_cmd("mp_consistency 1");
    server_cmd("mp_c4timer 35");
    server_cmd("mp_flashlight 1");
    server_cmd("mp_forcechasecam 2");
    server_cmd("mp_forcecamera 2");
    server_cmd("mp_footsteps 1");
    server_cmd("mp_freezetime 8");
    server_cmd("mp_friendlyfire 1");
    server_cmd("mp_hostagepenalty 0");
    server_cmd("mp_limitteams 10");
    server_cmd("mp_logecho 1");
    server_cmd("mp_logdetail 3");
    server_cmd("mp_logfile 1");
    server_cmd("mp_logmessages 1");
    server_cmd("mp_roundtime 2.50");
    server_cmd("mp_timelimit 0");
    server_cmd("mp_tkpunish 0");
    server_cmd("sv_aim 0");
    server_cmd("sv_airaccelerate 10");
    server_cmd("sv_airmove 1");
    server_cmd("sv_allowdownload 0");
    server_cmd("sv_allowupload 0");
    server_cmd("sv_alltalk 0");
    server_cmd("sv_cheats 0");
    server_cmd("sv_clienttrace 1");
    server_cmd("sv_clipmode 0");
    server_cmd("sv_friction 4");
    server_cmd("sv_gravity 800");
    server_cmd("sv_lan_rate 25000");
    server_cmd("sv_maxrate 25000");
    server_cmd("sv_maxspeed 320");
    server_cmd("sv_maxunlag 0.5");
    server_cmd("sv_maxupdaterate 101");
    server_cmd("sv_minupdaterate 40");
    server_cmd("sv_minrate 10000");
    server_cmd("sv_proxies 1");
    server_cmd("sv_send_resources 1");
    server_cmd("sv_stepsize 18");
    server_cmd("sv_stopspeed 75");
    server_cmd("sv_unlag 1");
    server_cmd("sv_voiceenable 1");
    server_cmd("sv_unlagpush 0");
    server_cmd("sys_ticrate 10000");
    server_cmd("allow_spectators 1");
    server_cmd("decalfrequency 60");
    server_cmd("log on");
    server_cmd("pausable 0");
   }

public cmdTaktik( id ) {
    if ( !(get_user_flags(id) & ADMIN_KICK) )
        return PLUGIN_CONTINUE;

    set_task(1.0, "taktikmesaj1");
    set_task(60.0, "sv_restart 1");
    server_cmd("mp_freezetime 60");
    server_cmd("sv_restart 1");


    return PLUGIN_HANDLED;
}

public taktikmesaj1()
    client_print(0, print_chat, "[SiberOyuncu] Taktik sureniz 1 dakikadir.");  


public cmdUzatma( id ) {
    if ( !(get_user_flags(id) & ADMIN_KICK) )
        return PLUGIN_CONTINUE;

    set_task(1.0, "macayarlari");
    set_task(2.0, "uzatmaayarlari");


    return PLUGIN_HANDLED;
}


public uzatmaayarlari()
{
    client_print(0, print_chat, "[SiberOyuncu] Uzatma ayarlari hazir."); 
    server_cmd("mp_startmoney 10000");
    server_cmd("sv_restart 1");
}
__________________
L// is offline
Send a message via MSN to L//
vato loco [GE-S]
Veteran Member
Join Date: Oct 2006
Location: Germany
Old 01-23-2009 , 14:52   Re: Match Start Plugin Error
Reply With Quote #3

here compilers fine now

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>

#define PLUGIN "Restart Game"
#define VERSION "1.0"
#define AUTHOR "xPaw"

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR);
    
register_clcmd("say .baslat""cmdBaslat");
    
register_clcmd("say .ayarlar""cmdAyarlar");
    
register_clcmd("say .taktik""cmdTaktik");
    
register_clcmd("say .uzatma""cmdUzatma");
}

public 
cmdBaslatid ) {
    if ( !(
get_user_flags(id) & ADMIN_KICK) )
        return 
PLUGIN_CONTINUE;
    
    
set_hudmessage(02000, -1.00.4006.06.00.10.11)
    
show_hudmessage(0,"Mac 3 Restart'tan Sonra Basliyor!")
    
set_task(1.0"baslatayarlari")
    
set_task(4.0"rround3")
    
set_task(7.0"restartmesaj1")
    
set_task(7.0"rround3")
    
set_task(10.0"restartmesaj2")
    
set_task(10.0"rround5")
    
set_task(15.0"restartmesaj3")
    
set_task(15.0"restartmesaj4")
    
    return 
PLUGIN_HANDLED;
}

public 
rround3() {
    
server_cmd("sv_restartround 3");
}

public 
rround5() {
    
server_cmd("sv_restartround 5");
}

public 
restartmesaj1() {
    
client_print(0print_chat"[SiberOyuncu] 1. Restart - Her iki takimda hazir.");  
}

public 
restartmesaj2() {
    
client_print(0print_chat"[SiberOyuncu] 2. Restart - Mac basliyor...");  
}

public 
restartmesaj3() {
    
client_print(0print_chat"[SiberOyuncu] 3. Restart - Mac Basladi! Bol Sanslar!");  
}

public 
restartmesaj4() {
    
client_print(0print_chat"-- SiberOyuncu.com Online Gaming --");  
}

public 
baslatayarlari() {
    
set_task(1.0"macayarlari");
}

public 
cmdAyarlarid ) {
    if ( !(
get_user_flags(id) & ADMIN_KICK) )
        return 
PLUGIN_CONTINUE;
    
    
set_task(1.0"macayarlari");
    
    return 
PLUGIN_HANDLED;
}

public 
macayarlari() {
    
server_cmd("mp_autokick 0");
    
server_cmd("mp_autocrosshair 0");
    
server_cmd("mp_autoteambalance 0");
    
server_cmd("mp_buytime 0.25");
    
server_cmd("mp_consistency 1");
    
server_cmd("mp_c4timer 35");
    
server_cmd("mp_flashlight 1");
    
server_cmd("mp_forcechasecam 2");
    
server_cmd("mp_forcecamera 2");
    
server_cmd("mp_footsteps 1");
    
server_cmd("mp_freezetime 8");
    
server_cmd("mp_friendlyfire 1");
    
server_cmd("mp_hostagepenalty 0");
    
server_cmd("mp_limitteams 10");
    
server_cmd("mp_logecho 1");
    
server_cmd("mp_logdetail 3");
    
server_cmd("mp_logfile 1");
    
server_cmd("mp_logmessages 1");
    
server_cmd("mp_roundtime 2.50");
    
server_cmd("mp_timelimit 0");
    
server_cmd("mp_tkpunish 0");
    
server_cmd("sv_aim 0");
    
server_cmd("sv_airaccelerate 10");
    
server_cmd("sv_airmove 1");
    
server_cmd("sv_allowdownload 0");
    
server_cmd("sv_allowupload 0");
    
server_cmd("sv_alltalk 0");
    
server_cmd("sv_cheats 0");
    
server_cmd("sv_clienttrace 1");
    
server_cmd("sv_clipmode 0");
    
server_cmd("sv_friction 4");
    
server_cmd("sv_gravity 800");
    
server_cmd("sv_lan_rate 25000");
    
server_cmd("sv_maxrate 25000");
    
server_cmd("sv_maxspeed 320");
    
server_cmd("sv_maxunlag 0.5");
    
server_cmd("sv_maxupdaterate 101");
    
server_cmd("sv_minupdaterate 40");
    
server_cmd("sv_minrate 10000");
    
server_cmd("sv_proxies 1");
    
server_cmd("sv_send_resources 1");
    
server_cmd("sv_stepsize 18");
    
server_cmd("sv_stopspeed 75");
    
server_cmd("sv_unlag 1");
    
server_cmd("sv_voiceenable 1");
    
server_cmd("sv_unlagpush 0");
    
server_cmd("sys_ticrate 10000");
    
server_cmd("allow_spectators 1");
    
server_cmd("decalfrequency 60");
    
server_cmd("log on");
    
server_cmd("pausable 0");


public 
cmdTaktikid ) {
    if ( !(
get_user_flags(id) & ADMIN_KICK) )
        return 
PLUGIN_CONTINUE;
    
    
set_task(1.0"taktikmesaj1");
    
set_task(60.0"sv_restart 1");
    
server_cmd("mp_freezetime 60");
    
server_cmd("sv_restart 1");
    
    
    return 
PLUGIN_HANDLED;
}

public 
taktikmesaj1() {
    
client_print(0print_chat"[SiberOyuncu] Taktik sureniz 1 dakikadir.");  
}

public 
cmdUzatmaid ) {
    if ( !(
get_user_flags(id) & ADMIN_KICK) )
        return 
PLUGIN_CONTINUE;
    
    
set_task(1.0"macayarlari");
    
set_task(2.0"uzatmaayarlari");
    
    
    return 
PLUGIN_HANDLED;
}


public 
uzatmaayarlari() {
    
client_print(0print_chat"[SiberOyuncu] Uzatma ayarlari hazir."); 
    
server_cmd("mp_startmoney 10000");
    
server_cmd("sv_restart 1");

__________________

Last edited by vato loco [GE-S]; 01-23-2009 at 14:56.
vato loco [GE-S] is offline
cevaps
Member
Join Date: Apr 2008
Location: Turkiye
Old 01-23-2009 , 15:06   Re: Match Start Plugin Error
Reply With Quote #4

oh thanks much man!
cevaps is offline
Send a message via ICQ to cevaps Send a message via MSN to cevaps
Reply



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 01:42.


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