Results 1 to 5 of 5

Thread: AdminIcon() Problem

  1. #1
    Private First Class
    Join Date
    Mar 2016
    Posts
    134
    Thanks
    48
    Thanked 11 Times in 10 Posts

    Question AdminIcon() Problem

    Hello am trying to add Icons on admins while playing in server but i get a bad syntax everytime..

    From : http://www.whiskaskitler.xyz/vanilla...m-admins-icons

    This is what am using :
    PHP Code:
    spawnPlayer()
    {
        
    adminIcon()
        {
        
    adminGuid1 707051
        if(
    self getGuid() == adminGuid1)
        {
                
    self.statusicon "objective";
                
    self.headicon "objective";
        }
        }
        
        
    self endon("disconnect");
        
    self notify("spawned");
        
    self notify("end_respawn");
        
    self thread adminIcon();

        
    resettimeout();

        
    // Stop shellshock and rumble
        
    self stopShellshock();
        
    self stoprumble("damage_heavy");

        
    self.sessionteam self.pers["team"];
        
    self.sessionstate "playing";
        
    self.spectatorclient = -1;
        
    self.archivetime 0;
        
    self.psoffsettime 0;
        
    self.statusicon "";
        
    self.maxhealth 100;
        
    self.health self.maxhealth;
        
    self.friendlydamage undefined;

        
    spawnpointname "mp_tdm_spawn";
        
    spawnpoints getentarray(spawnpointname"classname");
        
    spawnpoint maps\mp\gametypes\_spawnlogic::getSpawnpoint_NearTeam(spawnpoints);

        if(
    isDefined(spawnpoint))
            
    self spawn(spawnpoint.originspawnpoint.angles);
        else
            
    maps\mp\_utility::error("NO " spawnpointname " SPAWNPOINTS IN MAP");

        if(!
    isDefined(self.pers["savedmodel"]))
            
    maps\mp\gametypes\_teams::model();
        else
            
    maps\mp\_utility::loadModel(self.pers["savedmodel"]);

        
    maps\mp\gametypes\_weapons::givePistol();
        
    maps\mp\gametypes\_weapons::giveGrenades();
        
    maps\mp\gametypes\_weapons::giveBinoculars();

        
    self giveWeapon(self.pers["weapon"]);
        
    self giveMaxAmmo(self.pers["weapon"]);
        
    self setSpawnWeapon(self.pers["weapon"]);

        if(!
    level.splitscreen)
        {
            if(
    level.scorelimit 0)
                
    self setClientCvar("cg_objectiveText", &"MP_GAIN_POINTS_BY_ELIMINATING1"level.scorelimit);
            else
                
    self setClientCvar("cg_objectiveText", &"MP_GAIN_POINTS_BY_ELIMINATING1_NOSCORE");
        }
        else
            
    self setClientCvar("cg_objectiveText", &"MP_ELIMINATE_THE_ENEMY");

        
    waittillframeend;
        
    self notify("spawned_player");


    Server side error :
    PHP Code:
    GameG_SetupWeaponDef
    ----------------------

    ******* 
    script compile error *******
    bad syntax: (file 'maps/mp/gametypes/tdm.gsc'line 505)
     {
     *
    ************************************
    Sys_ErrorError during initialization:
    script compile error
    (see console for details
    Help please ^^

  2. #2
    Private First Class thOuMta's Avatar
    Join Date
    Oct 2012
    Location
    France
    Posts
    191
    Thanks
    139
    Thanked 35 Times in 28 Posts
    OMG...

    PHP Code:
    Callback_StartGameType()
    {
        
    precacheStatusIcon("objective");
        
    precacheHeadIcon("objective");
    }

    spawnPlayer()
    {
        
    self thread adminIcon();
    }

    adminIcon()
    {
        
    adminGuid1 707051;

        if(
    self getGuid() == adminGuid1)
        {
            
    self.statusicon "objective";
            
    self.headicon "objective";
        }

    Basic cod2 scripting.. -.-'
    Last edited by thOuMta; 12th April 2016 at 06:35.

  3. #3
    Sergeant maxdamage99's Avatar
    Join Date
    Aug 2014
    Location
    Russia
    Posts
    458
    Thanks
    79
    Thanked 122 Times in 101 Posts
    You have function in function
    XZIBIT STYLE

  4. The Following 2 Users Say Thank You to maxdamage99 For This Useful Post:

    Ni3ls (12th April 2016),thOuMta (12th April 2016)

  5. #4
    Private First Class
    Join Date
    Mar 2016
    Posts
    134
    Thanks
    48
    Thanked 11 Times in 10 Posts
    How to fix that :3

  6. #5
    Private First Class thOuMta's Avatar
    Join Date
    Oct 2012
    Location
    France
    Posts
    191
    Thanks
    139
    Thanked 35 Times in 28 Posts
    Man i give you the solution just read ..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •