AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   connect message script (https://forums.alliedmods.net/showthread.php?t=11639)

stigma 03-25-2005 08:51

connect message script
 
Well i've tryed to make a script, that would wirte a HUD message to a client when he joins... It goes like this:

Code:
#include <amxmodx> public client_putinserver(id) {   new username[33] get_user_name(id,username,32); } client_connect(id) {   set_hudmessage("255", "0", "0", "1.0", "0.35", "1", "6.0", "12.0", "1", "1", "4")   show_hudmessage("%s has joined the server!", username) } public plugin_init(){   register_plugin("connect","1.0","stigma")   return PLUGIN_CONTINUE }

I got one error:
(Line 4) error 001: expected token: ";", but found "-identifier-"

I hope some on can help me with this.

knekter 03-25-2005 08:59

Code:
client_connect(id) {   new UserName[33]   get_user_name(id, UserName, 32)   set_hudmessage(255, 0, 0, 1.0, 0.35, 1, 6.0, 12.0, 1, 1, 4)   show_hudmessage("%s has joined the server!", UserName) } public plugin_init(){   register_plugin("connect","1.0","stigma")   return PLUGIN_CONTINUE }

stigma 03-25-2005 09:08

Okay, thanks alot! :)

stigma 03-25-2005 09:14

Well okay, ive compiled it, and there no errors, but when i join the server, there aint appearing any message? :/ How can that be?

knekter 03-25-2005 09:17

hmm
 
Well this shows it when you are connecting. By the time you are actually in the server, the message will have faded away. If you want to see it when you enter use public client_putinserver(id) instead of client_connect(id)

stigma 03-25-2005 09:30

Hmm, do you have msn messenger? So i could got some impluse help? :P If you have, then please let me have your mail (:

stigma 03-25-2005 09:34

Well i've changed the client_connect(id) to client_putinserver(id) - aint working - But shouldent it go like this "public client_putinserver(id)" instead of just "client_putinserver(id)"?[/b]

v3x 03-25-2005 09:35

Yep.

stigma 03-25-2005 09:36

Ohh dident saw that you already have written public infront of client_putinserver :) my mistake

stigma 03-25-2005 09:38

Well i've added the public thing there. Now i get an error with my "show_hudmessage"

(Line 9) Error 035: argument type mismatch (argument 1)


All times are GMT -4. The time now is 09:59.

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