Results 1 to 2 of 2
  1. #1
    YuDi21's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    mp_complex
    Posts
    141
    Reputation
    12
    Thanks
    35
    My Mood
    Angelic

    Post 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;
    }
    Last edited by YuDi21; 01-25-2011 at 07:32 AM.

  2. #2
    foasdgg's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    83
    Reputation
    9
    Thanks
    37
    its "Gave"