Yes. This is my very minimum multiplayer script, its straight from the documentation:
function main()
{
... // do some initialization
if(!session_connect(app_name,"")) // no client found on the localhost?
session_open(app_name); // start as server
// => IMPORTANT!!
while(dplay_status < 2) wait(1); // wait until the session is opened or joined
dplay_localfunction = 2;
level_load("level.wmb");
while(dplay_status < 6) wait(1); // wait until the level is up to date
if (connection & CONNECT_SERVER) {
// do server stuff...
} else {
// do client stuff...
}
... // do more initialization...
}
All this must be also in your script. You can not write a multiplayer script without reading the manual or tutorial!!
Your code posted here looks different to the examples, it contains many lines that make no sense to me, but essential things are missing. When you create a client player in a multiplayer game, you must wait until its ID becomes valid before you can send its skills to the other clients:
while(!my.client_id) wait(1);
All this is in the tutorial. When you understand how the basic stuff works, then you can use more advanced functions like sending skills to a certain client.