Author Topic: i have a quetsion about server.cs thing  (Read 2612 times)

is it pretty much just a script?with name as server.cs?

server.cs tells your game client which script (cs file) to execute in order to run something.

Example (I know this code is wrong);

Exec: Weapon_weaponname.cs

I might be wrong though, don't take my word for it.

so do i need a server.cs and a script?or are they 1 thing?

You would have a seperate file for each.

Example:

server.cs

AND

Weapon_weaponname.cs

okay i got the idea but what is in the server.cs?

okay i got the idea but what is in the server.cs?

This is an example.

For the weapon "Barrett M82" it goes like this..

This is the inside of server.cs

exec("./Weapon_BarrettM82.cs");

I'll break this down for you.

There is a file called Weapon_BarrettM82.cs which defines the model (it's the script!) and everything else with the weapon.

Server.cs tells your client to execute the weapon when the game detects the add-on.

"exec" is the command that executes it, and the "Weapon_BarrettM82.cs" is the file it's executing.


ok so tell me if this is right

i wanna make a sword
i make a file for my sword
i make the model and export its .dts
i put the .dts into the file
i put the script into the file
i put the server.cs into the file
and i .zip the file
and release if it works right

the server.cs should have this in it

exec("/Weapon_Sword");
correct?

ok so tell me if this is right

i wanna make a sword
i make a file for my sword
i make the model and export its .dts
i put the .dts into the file
i put the script into the file
i put the server.cs into the file
and i .zip the file
and release if it works right

the server.cs should have this in it

exec("/Weapon_Sword");
correct?

exec("./Weapon_Sword");

I think you need the "."


(Also, you need a description.txt file in there!)

so i need the ./ not just a /?
and isnt the description just this "
authors name:SoulStealer
Item:Sword
Description:a sword"
or something like that?

server.cs, this file runs when you start a server when the add-on is checked in the add-on list.
client.cs, this file runs when you start Blockland.

So in conclusion, OrangeJuice's info isn't even needed, infact you could stick all the stuff in whatever weapon_sword is into server.cs and it would work just fine with 1 less file (1 less line of code).

server.cs, this file runs when you start a server when the add-on is checked in the add-on list.
client.cs, this file runs when you start Blockland.

So in conclusion, OrangeJuice's info isn't even needed, infact you could stick all the stuff in whatever weapon_sword is into server.cs and it would work just fine with 1 less file (1 less line of code).

I completely forgot about client.cs

*facepalm* ignore me..

server.cs, this file runs when you start a server when the add-on is checked in the add-on list.
client.cs, this file runs when you start Blockland.

So in conclusion, OrangeJuice's info isn't even needed, infact you could stick all the stuff in whatever weapon_sword is into server.cs and it would work just fine with 1 less file (1 less line of code).
you confuse me...

If that confuses you, I doubt you'll understand scripting.

If that confuses you, I doubt you'll understand scripting.
i use basic scripts....if i can figure out scripting later on ill make more complex scripts but for now can you just explain what you meant?

just tell me what the client.cs is...