This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Function Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Votorx
Senior Member
Join Date: Jun 2004
Old 10-20-2004 , 07:18   Function Help
Reply With Quote #1

I realize that there are alot of questions pertaining mostly to function behavior, description, parameter meanings and more. So I've decided to make this thread where you can post any function you'd like, ask a question towards that function and I (or some other scripter who's willing to help) will answer it as best as we could. But please keep this exclusive to individual functions instead of using it as a thread to debug plugins or ask how to script.

A perfectly good example of how to ask for help:

Plugin_Init()
What does this do?

Very plain, simple and to the point.

I will try to answer all querstions as fully as possible whenever I get the chance, but do understand I'm not on here 24/7....
__________________
Currently Looking for a mod team.
Votorx is offline
Send a message via AIM to Votorx Send a message via MSN to Votorx Send a message via Yahoo to Votorx
twistedeuphoria
Veteran Member
Join Date: Jul 2004
Old 10-20-2004 , 11:09  
Reply With Quote #2

Would you mind explaining fully what set_user_rendering can do?
__________________
twistedeuphoria is offline
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 10-20-2004 , 12:03  
Reply With Quote #3

Quote:
Originally Posted by twistedeuphoria
Would you mind explaining fully what set_user_rendering can do?
You might want to check out this thread:
http://djeyl.net/forum/index.php?showtopic=38044
__________________
hello, i am pm
PM is offline
twistedeuphoria
Veteran Member
Join Date: Jul 2004
Old 10-20-2004 , 18:39  
Reply With Quote #4

Thanks!
__________________
twistedeuphoria is offline
MC-Olivenoel
Member
Join Date: Oct 2004
Old 10-21-2004 , 02:05  
Reply With Quote #5

hi

Code:
/* Executes command on player. */
native client_cmd(index,const command[],{Float,Sql,Result,_}:...);

/* This is an emulation of a client command (commands aren't send to client!).
* It allows to execute some commands on players and bots.
* Function is excellent for forcing to do an action related to a game (not settings!).
* The command must stand alone but in arguments you can use spaces. */
native engclient_cmd(index,const command[],arg1[]="",arg2[]="");
whats better ?
can both do smae thing ?
what commands work/dosent work ?
some exampl... ?? say kill bind connect quit .....
MC-Olivenoel is offline
Votorx
Senior Member
Join Date: Jun 2004
Old 10-21-2004 , 13:08  
Reply With Quote #6

Im not to sure. I know for a fact that most scripters use client_cmd (excessively too). I suppose, from the description given, eng_cmd directly performs an engine command on the player given through index. I suppose these commands have to be related with the game you are using, not client commands though (like quit, kill, +forward) which originates from the client and is then sent from the client to the engine. I can't think of any engine commands off the time of my head though. As well while client_cmds may be relating to actual client commands whether that be set with amxmodx plugins or just general settings from the server.

So overall client_cmd is better, especially in your case where you want to execute commands like quit, connect and such on a player.
__________________
Currently Looking for a mod team.
Votorx is offline
Send a message via AIM to Votorx Send a message via MSN to Votorx Send a message via Yahoo to Votorx
AAA.Gigga
Junior Member
Join Date: Oct 2004
Old 10-29-2004 , 20:16  
Reply With Quote #7

am wondering if anyone could help me.... i am new to SMALL and am playing around writing a plugin...

the following is my plugin

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

public plugin_init() {
	register_plugin("Admin Call to IRC","0.16","AAA.Gigga")
	register_cvar("irc_hostname","<IP HERE>")	
	register_clcmd("needadmin","needadmin")
	register_clcmd("say /needadmin","needadmin")
	
	return PLUGIN_CONTINUE
}

public needadmin(id) {
	new name[32],ihostname[20],botcon,error
	get_user_name(id,name,32)
	get_cvar_string("irc_hostname",ihostname,15)
	botcon = socket_open(ihostname, 9090, SOCKET_TCP, error)
	
	if(botcon < 1)
	{
		server_print("[AMXX] Server [ADMIN] Requested by %s :: Failed :: %s", name, error)
		return PLUGIN_HANDLED
	} 
	client_print(0,print_chat,"[AMXX] Server [ADMIN] Requested by %s :: A request for a Server Admin has been sent to #aaa", name)
	server_print("[AMXX] Server [ADMIN] Requested by %s :: A request for a Server Admin has been sent to #aaa", name)
	socket_close(botcon)
	return PLUGIN_CONTINUE
}
what i am trying to do is a socket connect at open of script and close at end, i ave changed it temp to check to see if it works...

without all the socket stull the command works fine in game, on command it frints a message to the id.. all good

soon as i add the socket stuff
i get a error when server loads that says

L 10/30/2004 - 04:06:41: [AMXX] Function not found (name "socket_close") (plugin "pluginname.amx")

if i temp remove socket close i get the same error about socket_open
is there a problem that is realy noticable?

i am using amxx 0.16 and the compiler that it came with
compiling works fine.. no errors

any help would be great
AAA.Gigga is offline
BAILOPAN
Join Date: Jan 2004
Old 10-29-2004 , 20:20  
Reply With Quote #8

enable socket module.

also don't bump old posts with irrelevant content
__________________
egg
BAILOPAN is offline
AAA.Gigga
Junior Member
Join Date: Oct 2004
Old 10-30-2004 , 00:10  
Reply With Quote #9

sorry... only posted here because it was about functions..

can i use the .20 socket module in .16?
AAA.Gigga is offline
BAILOPAN
Join Date: Jan 2004
Old 10-30-2004 , 01:37  
Reply With Quote #10

nope. if you look in module section archives you can find 0.16 version
__________________
egg
BAILOPAN 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 13:35.


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