Raised This Month: $120 Target: $400
 30% 

help to build a script


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
benmassey
Junior Member
Join Date: Dec 2018
Old 12-08-2018 , 09:26   help to build a script
Reply With Quote #1

so i wwant to try build a script
when i write !sa
its will send a massage to chat
wellcome to my server with diffrent color's

and every 120 sec it will send massage to chat
wellcome to my server have fun (with colors)

any help? someone can guide me?
benmassey is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 12-08-2018 , 11:04   Re: help to build a script
Reply With Quote #2

Quote:
Originally Posted by benmassey View Post
so i wwant to try build a script
when i write !sa
its will send a massage to chat
wellcome to my server with diffrent color's

and every 120 sec it will send massage to chat
wellcome to my server have fun (with colors)

any help? someone can guide me?
https://wiki.alliedmods.net/Introduction_to_SourcePawn
__________________
8guawong is offline
benmassey
Junior Member
Join Date: Dec 2018
Old 12-08-2018 , 11:12   Re: help to build a script
Reply With Quote #3

i saw it but i cant understand what i need to use to do those commands
benmassey is offline
iskenderkebab33
Senior Member
Join Date: Jun 2018
Location: de_alliedmods
Old 12-08-2018 , 11:33   Re: help to build a script
Reply With Quote #4

PHP Code:
#include <sourcemod>

#pragma semicolon 1
#pragma newdecls required

public void OnPluginStart()
{
    
RegConsoleCmd("sm_sa"CMD_sa"Welcome message");
    
    
HookEvent("round_start"Hook_roundstart);
}

public 
Action CMD_sa(int clientint args)
{
    
PrintToChat(client" \x05 Welcome to my Server \x01 GL&HF");
}

public 
Action Hook_roundstart(Event event, const char[] namebool dontBroadcast)
{
    
CreateTimer(120.0welcome_timerTIMER_REPEAT);
}

public 
Action welcome_timer(Handle timer)
{
    
PrintToChatAll(" \x05 Welcome to my Server \x01 have fun!");

iskenderkebab33 is offline
Reply


Thread Tools
Display Modes

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 14:04.


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