suck000
12th April 2016, 07:20
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/index.php?p=/discussion/12/custom-admins-icons
This is what am using :
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_NearT eam(spawnpoints);
if(isDefined(spawnpoint))
self spawn(spawnpoint.origin, spawnpoint.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 :
Game: G_SetupWeaponDef
----------------------
******* script compile error *******
bad syntax: (file 'maps/mp/gametypes/tdm.gsc', line 505)
{
*
************************************
Sys_Error: Error during initialization:
script compile error
(see console for details)
Help please ^^
From : http://www.whiskaskitler.xyz/vanilla/index.php?p=/discussion/12/custom-admins-icons
This is what am using :
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_NearT eam(spawnpoints);
if(isDefined(spawnpoint))
self spawn(spawnpoint.origin, spawnpoint.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 :
Game: G_SetupWeaponDef
----------------------
******* script compile error *******
bad syntax: (file 'maps/mp/gametypes/tdm.gsc', line 505)
{
*
************************************
Sys_Error: Error during initialization:
script compile error
(see console for details)
Help please ^^