Posted By: oliver2s
ent_create on client, no function started - 05/15/07 09:47
I thought this is a simple code, but I spent at least 4 hours of testing and nothing works. The problem is that I create an entity on the client with "ent_create". Now it will be created globally. That works fine. But the function were not started on the server...
Code:
if I call the sv_player function manually offline the file will be created. Anyone an idea?
Code:
dedicated server is running....
client join....
function sv_player
{
file_cpy("testfile", "player.mdl"); //create a file on harddisk to see if the function were started
}
starter start_game
{
if(connection == 2)
{
level_load("map1.wmb");
wait(-0.5);
player = ent_create("player.mdl", vector(0,0,20), sv_player); // now it should start the sv_player function on the server, but it doesn't
}
}
if I call the sv_player function manually offline the file will be created. Anyone an idea?