Quote from: Honey on Apr 27, 2015, 05:27 PMBasically, We make files with the extension .nut which are read by the server, You start by making a main file also known as main.nut, You can change the main file by going into server.cfg and replacing sqgamemode with the required file directory for e.g. If I've my Main file in Scripts Folder I would load it like this :
sqgamemode Scripts\Main.nut ( It may be the wrong slash, Just for showing purposes )
Then You can start by OnScriptLoad(); Which is read by the server before anything else, Like before You can see Other Official Events and Functions in the wiki. Some examples are OnPlayerCommand( params ) ( Gets triggered when a player enters a command like /register ) or OnPlayerHealthChange( newhp, oldhp ), Scripting examples :Code Selectfunction onPlayerCommand( player, cmd, text ) // Hopefully these were the ones :)
{
if ( cmd == "hello ")
{
MessagePlayer( " Hey ", player );
}
}
And
OnScriptLoad()
{
print( "Script Loaded") // Prints "Script Loaded " when server starts
}
Hopefully that'll help you start, If you need help don't hesitate to ask
Thank you. And what program to open and edit the files .nut? And from where I can download the server files? The link to the wiki page http://wiki.vc-mp.org/wiki/Main_Page or server from one topic to the forum http://forum.vc-mp.org/?topic=33.0 ?