AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Message_Begin shutsdown server (https://forums.alliedmods.net/showthread.php?t=25653)

The Ted 03-17-2006 22:53

Message_Begin shutsdown server
 
This code shuts down the server. I am requesting some help for this

Code:

//Item Sunglasses
public item_sunglasses()
{
        new arg[32], id
        read_argv(1,arg,31)
        id = str_to_num(arg)
        if(onoff==0)
        {
                message_begin(MSG_ONE, gmsgFade, {0,0,0}, id)
                write_short(1<<0)
                write_short(1<<0)
                write_short(1<<0)
                write_byte(0)
                write_byte(0) 
                write_byte(0) 
                write_byte(200) 
                message_end()
                client_cmd(id,"say /me puts on sunglasses")
                onoff=1
                return PLUGIN_HANDLED
        }
        else
        {
                message_begin(MSG_ONE, gmsgFade, {0,0,0}, id)
                write_short(1<<0)
                write_short(1<<0)
                write_short(1<<0)
                write_byte(0)
                write_byte(0) 
                write_byte(0) 
                write_byte(0) 
                message_end()
                client_cmd(id,"say /me takes off sunglasses")
                onoff=0
                return PLUGIN_HANDLED
        }
        return PLUGIN_HANDLED
}


jtp10181 03-17-2006 22:59

probably an invalid message, an error would be nice.

The Ted 03-17-2006 23:52

Well... the problem is it closes the game completely. The error logs only says.
Quote:

L 03/17/2006 - 23:52:13: [META] ini: Begin re-reading plugins list: /home/codyhu/hlds_l/ts/addons/metamod/plugins.ini
L 03/17/2006 - 23:52:13: [META] ini: Read plugin config for: AMX Mod X
L 03/17/2006 - 23:52:13: [META] ini: Finished reading plugins list: /home/codyhu/hlds_l/ts/addons/metamod/plugins.ini; Found 1 plugins
L 03/17/2006 - 23:52:13: [META] dll: Updating plugins...
L 03/17/2006 - 23:52:13: [META] dll: Finished updating 1 plugins; kept 1, loaded 0, unloaded 0, reloaded 0, delayed 0
L 03/17/2006 - 23:52:13: "Tyrannus Vicious<-1><><-1>" disconnected
L 03/17/2006 - 23:52:13: "Jacob Vivalldi<-1><><-1>" disconnected
L 03/17/2006 - 23:52:13: "George Skull 'BF Rec'<-1><><-1>" disconnected
L 03/17/2006 - 23:52:13: "Tony Cipriani'BF Hitman'<-1><><-1>" disconnected
L 03/17/2006 - 23:52:13: "Maczek Wolniek<-1><><-1>" disconnected
L 03/17/2006 - 23:52:14: Server shutdown
L 03/17/2006 - 23:52:14: Log file closed

Freecode 03-18-2006 00:08

post your whole plugin

The Ted 03-18-2006 00:11

Quote:

Originally Posted by Freecode
post your whole plugin

It would be pretty pointless for me to do. Only that function cause the problem and have no relevance to anything else. Not to mention it is way too large to be put on the forum.

Des12 03-18-2006 00:30

do you have gmsgFade declared?

Freecode 03-18-2006 00:48

Quote:

Originally Posted by The Ted
Quote:

Originally Posted by Freecode
post your whole plugin

It would be pretty pointless for me to do. Only that function cause the problem and have no relevance to anything else. Not to mention it is way too large to be put on the forum.

right, but what calls that function? how are you declaring fade var? is the decleration wrong? Those are the reasons i said post. Plus you can attach it, no need to post the source ;]

Xanimos 03-18-2006 00:49

Hello Freecode.


[/code]Hello PM.[/b][/quote]

The Ted 03-18-2006 00:52

There it is. Everysingle other time I used it, worked fine. And yes this is based off of Harbu's item plugin.

Freecode 03-18-2006 01:00

does
Code:
public item_flashbang()
work without any crash?


All times are GMT -4. The time now is 16:30.

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