Liberty Unleashed

Scripting => Script Help => Topic started by: mimomohamed on August 12, 2012, 10:01:40 pm

Title: what is the problem in this
Post by: mimomohamed on August 12, 2012, 10:01:40 pm
Quote
function onPlayerEnterSphere( player, Sph )
{
    Sph.Remove();
   if ( player.Vehicle )
   {
   CallServerFunc( "one/one1.nut", "one2", FindLocalPlayer() );
   }
    return 1;
}


it says
(http://www.mlfnt.com/lives6/13448054701.png)

the 42 line is CallServerFunc( "one/one1.nut", "one2", FindLocalPlayer() );
Title: Re: what is the problem in this
Post by: Thijn on August 13, 2012, 03:00:54 pm
You're running an client script as server script.
Change your script.xml file so it says client="1" behind the file.
Title: Re: what is the problem in this
Post by: mimomohamed on August 14, 2012, 10:39:51 am
If I have understood you well ;
I can't make it client="1"
because i need it
function onPlayerEnterSphere( plr, sphere )

so i have made a different that i made

CallClientFunc( plr, ""one/one1.nut", "one2" );

but now no any wrong appear in the server.exe when i activate this function and no thing happen so help me please why not working ???????

 
Title: Re: what is the problem in this
Post by: mimomohamed on August 15, 2012, 08:28:37 pm
Please help me it doesn't work why why why why ?
Title: Re: what is the problem in this
Post by: VetalYA on August 16, 2012, 08:01:57 pm
it doesn't work
Because, it depends on what you want to get (as a result).
Title: Re: what is the problem in this
Post by: mimomohamed on August 16, 2012, 08:09:16 pm
i have called the right function and can u explain more  !!
Title: Re: what is the problem in this
Post by: Thijn on August 17, 2012, 11:08:08 am
You can do the thing you want in a client script as there is a onClientEnterSphere (http://liberty-unleashed.co.uk/LUWiki/Squirrel/Client/Events/Sphere/onClientEnterSphere) event.