How does scripts in mod work?

broken avatar :(
Created 1432 days ago
by hajhaka
0 Members and 1 Guest are viewing this topic.
704 views
broken avatar :(
×
broken avatar :(
Location: se
Date Registered: 1 November 2013
Last active: 1271 days ago
Posts
61
Respect
Forum Rank
Rotting Walker
Primary Group
Member
×
hajhaka's Groups
hajhaka's Contact & Social Links
so i saw another post about this he had apparently fixed it using a script called _clienttids.gsc
so i added it to my scripts zm in my mod and the script looks like this
{
   // this is now handled in code ( not lan )
   // see s_nextScriptClientId
   level.clientid = 0;
}

function points()
{
    players = getplayers();
    for( i=0;i<players.size;i++ )
    {
        players.score = 500000;
    }
}

function on_player_connect()
{
   self.clientid = matchRecordNewPlayer( self );
   if ( !isdefined( self.clientid ) || self.clientid == -1 )
   {
      self.clientid = level.clientid;
      level.clientid++;   // Is this safe? What if a server runs for a long time and many people join/leave
      level.player_starting_points = 500000;
   }

}
but when i launch the game nothing happens
yes i have tried adding leved thread points();
Last Edit: October 20, 2016, 01:34:35 pm by hajhaka

 

Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch
Loading ...