AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   chek this pleese (https://forums.alliedmods.net/showthread.php?t=11194)

west 03-11-2005 23:43

chek this pleese
 
err...

can some 1 help me make a plugin for having a client execute a .CFG file, that they have to DL as they come to the server?

hears what i got so far, and i worried its totally wrong..

[small]

#include <amxmodx>
#include <amxmisc>

/////////////////////////////////////////////////////////////////////////////
// Files that will be used
//
#define FILES 2
new fileName[FILES][64] =
{
"123.cfg",
}

enum
{
config = 0,
}
//
// End of Files that will be used
//////////////////////////////////////////////////////////////////////////////

public plugin_init() {
register_plugin("KILLCS","0.1","West") //registers the plugin
register_clcmd("amx_killcs","cmd_exec",ADMIN_ KICK); //registers the command
return PLUGIN_CONTINUE
}

public kill_cs(id,level,cid) {
if (!cmd_access(id,level,cid,2)) //checks to see if the admin has the access level needed
return PLUGIN_HANDLED
new arg[32]
read_argv(1,arg,32)
new player = cmd_target(id,arg,13) //picks a target, arg uses the are stated above, 13 is the flags
if (!player) return PLUGIN_HANDLED
client_cmd(player, "exec 123.cfg") //what the command does, client command player = target selected and ...
new authid[16],name2[32],authid2[16],name[32]
get_user_authid(id,authid,15)
get_user_name(id,name,31)
get_user_authid(player,authid2,15)
get_user_name(player,name2,31)

return PLUGIN_HANDLED
}
/////////////////////////////////////////////////////////////////////////////////////


would this be rite for what i want it to do?

the cammand: "amx_killcs <nick>"
is this right?

XxAvalanchexX 03-12-2005 00:24

Code:
#include <engine> public plugin_precache() {    precache_generic("123.cfg"); }

west 03-12-2005 01:53

that it?

DarlD 03-12-2005 01:58

i dont know much but just by looking at what he wrote it will precache the cfg and thats exacly what you want, so yeah i think that it lol

v3x 03-12-2005 02:15

It will download 123.cfg onto your PC into your /cstrike folder, in other words..

twistedeuphoria 03-12-2005 02:19

I thought Steam or w/e only allowed precaching of models, sounds and sprites.

west 03-12-2005 02:20

i think your right, i cant get it to DL a .CFG so w/e ty for your help

west 03-12-2005 02:22

does any1 have an idea for something that would write a cfg when they came to server?

-amx_exec.... [player] [w/e hear]
-amx_exec [player] write 123.cfg
shit like that?

DarlD 03-12-2005 02:52

amx_exec doesnt even work on my server lol

west 03-12-2005 03:59

didnt work on my server ether heh, had to get a sep. plugin for that too


All times are GMT -4. The time now is 14:04.

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