function reloadMe()
{
exec("Config/Server/yo2.cs");
{
function servercmdHi(%client)
{
Messageclient(%client,'',"Hi.");
}
function servercmdHello(%client)
{
Messageclient(%client,'',"<color:27C90A><font:Impact:40>-- <color:0293BF><font:Impact:30>This addon is working fine");
}
This does'nt seem to work
It does not work because you put an opening bracket at the end of the reloadMe function, instead of a closing bracket. None of the script executes if there's a syntax error.
How to i put my .cs in a zip and put it on my server so everytime i don't need to exec("config/server/yo2"); Thanks, And thank you for the positive replyes
It only needs to be in a .zip if your planning on sharing it with other people. Otherwise it can just be in a folder.
Step 1: make a folder named Server_MyAddOn in your Add-Ons folder.
Step 2: make a server.cs file in Server_MyAddOn. Put your script in here.
Step 3: make a description.txt file in Server_MyAddOn. It does not matter what text is inside it, it can even be blank.
Step 4: When you start a custom server, enabled Server_MyAddOn. Tada. Your add on was executed when you started the server. But if you make any changes to it while the server is up, you need to use
exec("Add-Ons/Server_MyAddOn/server.cs"); to make those changes take effect.