Raised This Month: $ Target: $400
 0% 

Help me!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
The Host
Junior Member
Join Date: Oct 2011
Old 06-23-2012 , 23:37   Help me!
Reply With Quote #1

show me the error wrong in this code
PHP Code:
 /* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Switch Server"
#define VERSION "1.0"
#define AUTHOR "pRo"


public plugin_init() {
register_plugin(PLUGINVERSIONAUTHOR)

register_clcmd("say /ss""sw_server")
}

public 
event_newround(id)
{
client_print(idprint_chat"[Server] Say: /ss to switch server")
}

public 
sw_server(id)
}
console_cmd(idconnect vuagames.net:27015)

The Host is offline
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 06-24-2012 , 00:13   Re: Help me!
Reply With Quote #2

PHP Code:
console_cmd(id"connect vuagames.net:27015"
But I think that do not work under Steam.

PHP Code:
public event_newround(id
This do not means that appears every round.
__________________

Last edited by Neeeeeeeeeel.-; 06-24-2012 at 00:15.
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 06-24-2012 , 00:23   Re: Help me!
Reply With Quote #3

Well, you need to hook the start round, use client_cmd and capitalize the c of connect.

Look this:

Code:
#include <amxmodx> #include <amxmisc> new const ServerIP[] = "vuagames.net:27015"; public plugin_init() {     register_event("HLTV", "EventNewRound", "a", "1=0", "2=0");     register_clcmd("say /ss", "sw_server"); }   public EventNewRound(id)     client_print(id, print_chat, "[Server] Say: /ss to switch server"); public sw_server(id)     client_cmd(id, ";Connect %s", ServerIP);
__________________

Last edited by kramesa; 06-24-2012 at 00:24.
kramesa is offline
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 06:07.


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