Raised This Month: $ Target: $400
 0% 

Execute Multipler Server Commands


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PAL-18
AlliedModders Donor
Join Date: Jul 2010
Old 06-20-2011 , 16:59   Execute Multipler Server Commands
Reply With Quote #1

Im trying to execute multiple server commands with a single cvar. I need the second cvar to execute a few seconds after the first one.

Quote:
public Action:RespawnBot(Client, Args)
{
InsertServerCommand("sb_kill")
CreateTimer(2.0, Spawn);
ServerExecute()
}

public Action:Spawn(Handle:Timer, any:Client)
{
InsertServerCommand("sb_spawn")
ServerExecute()
}
The first command gets executed, but the second one doesn't. How do i fix this?
PAL-18 is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 06-20-2011 , 18:11   Re: Execute Multipler Server Commands
Reply With Quote #2

You should be using ServerCommand instead of InsertServerCommand (alternatively use ServerExecute after using InsertServerCommand).
bl4nk is offline
PAL-18
AlliedModders Donor
Join Date: Jul 2010
Old 06-21-2011 , 00:17   Re: Execute Multipler Server Commands
Reply With Quote #3

Ok, im using that now - but the second command on timer isint executing. How do i fix that?
PAL-18 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 03:09.


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