This might be some type of timing issue with the startup of the game. I would suggest moving the code to main () and including a wait to make sure the client connection to the server has completed. Something like this:
Code:
function sv_player
{
file_cpy("testfile", "player.mdl"); //create a file on harddisk to see if the function were started
}
function main ()
{
level_load("map1.wmb");
wait(-0.5); // make sure the level is fully loaded
ifdef client;
while(connection== 0) {wait(1);} // make sure we have a connection to the server
endif;
if(connection == 2)
{
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
}
}