Raised This Month: $ Target: $400
 0% 

simple SP to execute SM commands on round start?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Robin955
Veteran Member
Join Date: Jun 2013
Old 05-17-2015 , 15:37   simple SP to execute SM commands on round start?
Reply With Quote #1

someone who has some code where you can simply pick a /sm command to be said by a plugin every round start? (onRoundStart)

need to give it a try, and if so i got a feeling it will spam with /sm console blabla in admin chat but whatever lets see how it does.

il look around for a plugin that already does it just in case i missed something

FOR CSS

Last edited by Robin955; 05-17-2015 at 15:53.
Robin955 is offline
Amroth
Senior Member
Join Date: Apr 2013
Location: /root
Old 05-17-2015 , 19:18   Re: simple SP to execute SM commands on round start?
Reply With Quote #2

Code:
public OnPluginStart()
{
    HookEvent("round_start", OnRoundStartEvent);
}

public Action:OnRoundStartEvent(Handle:event, const String:name[], bool:dontBroadcast)
{
    ServerCommand("your command here");
        
    return Plugin_Continue;
}
Amroth is offline
secondtimesold
Senior Member
Join Date: Feb 2015
Old 05-17-2015 , 19:55   Re: simple SP to execute SM commands on round start?
Reply With Quote #3

how could you use a command with this with also using @all behind the command to run for everyone on server?
__________________
secondtimesold is offline
lay295
Senior Member
Join Date: Sep 2013
Old 05-17-2015 , 20:42   Re: simple SP to execute SM commands on round start?
Reply With Quote #4

Quote:
Originally Posted by secondtimesold View Post
how could you use a command with this with also using @all behind the command to run for everyone on server?
Code:
public OnPluginStart()
{
    HookEvent("round_start", OnRoundStartEvent);
}

public Action:OnRoundStartEvent(Handle:event, const String:name[], bool:dontBroadcast)
{
    ServerCommand("sm_drug @all");
        
    return Plugin_Continue;
}
Is that what you mean? Not exactly sure, it's just part of the command
__________________

lay295 is offline
Robin955
Veteran Member
Join Date: Jun 2013
Old 05-17-2015 , 21:12   Re: simple SP to execute SM commands on round start?
Reply With Quote #5

thats like the beginning of the beginning of the beginning of the total beginning of scripters level

see how bad i am? =)
Robin955 is offline
Chokitu
Senior Member
Join Date: Oct 2013
Old 05-17-2015 , 21:48   Re: simple SP to execute SM commands on round start?
Reply With Quote #6

Quote:
thats like the beginning of the beginning of the beginning of the total beginning of scripters level

see how bad i am? =)

You are not bad, you just need help. Everyone is good
Chokitu is offline
Send a message via Skype™ to Chokitu
secondtimesold
Senior Member
Join Date: Feb 2015
Old 05-17-2015 , 22:05   Re: simple SP to execute SM commands on round start?
Reply With Quote #7

if I use the compiler with just command it compiles but if I add @all it fails
__________________
secondtimesold is offline
Robin955
Veteran Member
Join Date: Jun 2013
Old 05-17-2015 , 23:26   Re: simple SP to execute SM commands on round start?
Reply With Quote #8

Quote:
Originally Posted by secondtimesold View Post
if I use the compiler with just command it compiles but if I add @all it fails
so you're saying you're copy paste skills failed here or that this actually doesn't work?

public OnPluginStart()
{
HookEvent("round_start", OnRoundStartEvent);
}

public Action:OnRoundStartEvent(Handle:event, const String:name[], bool:dontBroadcast)
{
ServerCommand("sm_drug @all");

return Plugin_Continue;
}
Robin955 is offline
lay295
Senior Member
Join Date: Sep 2013
Old 05-17-2015 , 23:30   Re: simple SP to execute SM commands on round start?
Reply With Quote #9

Quote:
Originally Posted by secondtimesold View Post
if I use the compiler with just command it compiles but if I add @all it fails
Compiles fine with the web compiler, what error are you getting?
__________________

lay295 is offline
Robin955
Veteran Member
Join Date: Jun 2013
Old 05-18-2015 , 20:33   Re: simple SP to execute SM commands on round start?
Reply With Quote #10

works fine for me aswell
Robin955 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 17:37.


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