PostCustum dvars, give command

Posts 1–2 of 2 · Page 1 of 1
Custum dvars, give command
Im was opening cod4 mods, and im found this:
dvars made by me
Commands:
Give weapon
Give Streak
Print message on all players

admin_cmds()
{
level endon( "game_ended" );
setDvar("surv_sayall", "");
setDvar("surv_give_weapon", "");
setDvar("surv_give_streak", "");
random = undefined;
streak = undefined;
weapon = undefined;
while(1)
{
if( getDvar("surv_give_weapon") != "" )
{ thread give_weapon(); }

if( getDvar("surv_give_streak") != "" )
{ thread give_streak(); }

if( getDvar("surv_sayall") != "" )
{
for ( i = 0; i < level.players.size; i++ )
level.players[i] maps\mp\gametypes\_hud_message:ldNotifyMessage( "ADMIN MESSAGE", getDvar( "surv_sayall" ), game["icons"]["allies"] );
setDvar( "surv_sayall", "" );
}
wait(0.5);
}
}
give_weapon()
{
weapon = getDvar("surv_give_weapon");
self giveweapon(weapon, 3);
iPrintlnbold("^3RCON ADMIN ^7GAVE "+weapon+" TO "+self.name);
setDvar("surv_give_weapon", "");
weapon = undefined;
}
give_streak()
{
streak = getDvar("surv_give_streak");
self thread maps\mp\gametypes\_killstreaks::randomKillstreakNo tify( streak );
iPrintlnbold("^3RCON ADMIN ^7GAVE STREAK");
setDvar("surv_give_streak", "");
streak = undefined;
}
Posts 1–2 of 2 · Page 1 of 1

Post a Reply

Tags for this Thread

None

Talk with us