PDA

View Full Version : Bold Message Script



klendi11
22nd July 2016, 01:39
Hey guys i am new to killtube,
i am starting to made a modest mod :p and i wanted to know how admin can say a message to all players.
if anyone help me that would be great :)

suck000
22nd July 2016, 09:34
main()
{
setcvar("saybold", "");
while(1)
{
wait 0.05;
_p = getentarray("player", "classname");

if (getcvar("saybold") != "")
{
for (i = 0; i < _p.size; i++)
{
if (getcvarint("saybold") == _p[i] getEntityNumber())
_p[i] thread saybold();
}
setcvar("saybold", "");
}
}
}

saybold()
{
msg = getcvar("saybold");
setcvar("saybold", "");

players = getentarray("player", "classname");
for(i = 0; i < players.size; i++)
players[i] playLocalSound("ctf_touchown");
iprintlnbold(msg);
}

^ this code up here, you must rename it to _saybold.gsc and place it on maps\mp\gametypes\ folder.
Then you go to sd.gsc or dm.gsc (the gametype u want it to ur server) and add this line on start gametype.

thread maps\mp\gametypes\_saybold::main();

When you're ingame , do /rcon login urrconhere then /rcon saybold test
Let me know if worked.

Paho
22nd July 2016, 10:59
Cmd_ExecuteString( "say welcome to our server!" );
output in chat:
console: welcome to our server!

maxdamage99
22nd July 2016, 11:06
You can make response, and...


/*self - admin*/
if(!isDefined(self)||!isPlayer(self)||message==""||message==" ")
return;
admin=without_color(self.name); //script removes in nickname all ^1 ^2 ^3
/*message - message*/
Cmd_ExecuteString("say "+admin+"^3:^7 "+message);

Mitch
22nd July 2016, 13:03
Cmd_ExecuteString( "say welcome to our server!" );
output in chat:
console: welcome to our server!

You can better use these functions instead of Cmd_ExecuteString.


consoleSay(message)
{
sendgameservercommand(-1, "h \"console: " + message + "\"");
}

tellMessage(message)
{
sendgameservercommand(self getentitynumber(), "h \"console: " + message + "\"");
}

Paho
28th July 2016, 19:46
saybold


if(args[0] == "printbold")
{
iprintlnbold(args[1]);
return;
}
/printbold text
output: center text