AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   redirect a steamid (https://forums.alliedmods.net/showthread.php?t=20262)

Sir-LaggAlot 11-04-2005 20:04

redirect a steamid
 
1 Attachment(s)
alright, im kinda stuck here on how to redirect a specific steam id to another server... i kinda need a little help plz :cry: :cry:

Hawk552 11-04-2005 20:08

Not sure what you're trying to do , but try this:

Code:
public plugin_init() {     register_plugin("Redirect","0.9.4","JTP10181 / sonic")     register_cvar("redir_steamid","STEAM_0:0:123456")     register_cvar("redir_server","127.0.0.1") } public client_connect(id) {     new steamid[33],redir[64],server[64]         get_cvar_string("redir_steamid",63)     get_cvar_string("redir_server",server,63)         get_user_authid(id,steamid,32)     if(equal(steamid,redir))         client_cmd(id,"connect %s",server)             return PLUGIN_HANDLED }

Sir-LaggAlot 11-04-2005 20:14

im trying to send this specific person to a diff server by steamid

and i got a whole bunch of errors when i compile that u just told me

Hawk552 11-04-2005 20:26

Add #include <amxmodx>

Sir-LaggAlot 11-04-2005 20:30

i got an error saying this line doesnt meet argument or seomthing
get_cvar_string("redir_steamid",63)

Hawk552 11-04-2005 20:37

Sorry, screwed up in the pasting. try this:

Code:
#include <amxmodx> public plugin_init() {     register_plugin("Redirect","0.9.4","JTP10181 / sonic")     register_cvar("redir_steamid","STEAM_0:0:123456")     register_cvar("redir_server","127.0.0.1") } public client_authorized(id) {     new steamid[33],redir[64],server[64]         get_cvar_string("redir_steamid",redir,63)     get_cvar_string("redir_server",server,63)         get_user_authid(id,steamid,32)     if(equal(steamid,redir))         client_cmd(id,"connect %s",server)             return PLUGIN_HANDLED }

Sir-LaggAlot 11-04-2005 20:47

Thnx alot
No errors :D

XxAvalanchexX 11-04-2005 20:54

did you remember to #include <amxmodx>?

EDIT: whoops, late post

Sir-LaggAlot 11-04-2005 22:02

Yeah i remembered.. i hope it work so that person will be like "WTF... i cant join this server" :lol:


All times are GMT -4. The time now is 23:37.

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