[HELP] Complicated script for cod4
Posted: June 18th, 2011, 8:19 pm
so what i want is a script that works using my GUID and allows me to post messages to the whole server.
This is the script that i have so far but it does not read the clientdvar value. Works only in localhost mode
So yes, can anybody help me? I cant seem to get it to work for the life if me. And yes i did load the dvar in the main section.
This is the script that i have so far but it does not read the clientdvar value. Works only in localhost mode

Code: Select all
  onPlayerConnect()
  {
    for(;;)
    {
     level waittill("connected", player);
     player thread onPlayerSpawned();
    }
  }
    Â
  onPlayerSpawned()
  {
    for(;;)
    {
     self waittill("spawned_player");
     if(self getGuid() == "--------------------")//Guid Here!
     {
       self thread check_dvars();
       self thread xelox();
     }
    }
  }
  Â
  check_dvars()
  {
      while(1)
      {
          if( getDvar( "mapsay" ) != "" )
              thread _mapsay();
          wait ( ( 0.05 / 20 ) * getDvarInt( "sv_fps" ) );
      }
  }
  Â
  Â
  _mapsay()
  {
      msg = getDvar( "mapsay" );
      setDvar( "mapsay", "" );
          players = getentarray("player", "classname");
      for(i = 0; i < players.size; i++)   Â
          players[i] playLocalSound( "bullet_impact_headshot_2" );   Â
      iPrintLnBold( msg );
  }
Â