Skip to content

Zoro-6191/cod4-advanced-scripts

Repository files navigation

Advanced Scripts

This repository contains all my best GSC scripts over the years that I never shared with anyone.
Each of these is individually usable and can be configured from within the GSC.
Contributions are welcome.

Scripts and Features:

Each of them also includes necessary files and installation method in case you want just one of them.
I suggest using zoro\_eventhandler even if you're not running any of the other scripts. Although all the scripts work even without it.

Repo contains:

AFK-Plus Script

Features:

  • Classy looks
  • Auto forcespectate and/or forcekick AFK players
  • Players are switched to TEAM_NONE, ensuring they can't even spectate while AFK
  • Different techniques for SND/SNR and DM/TDM

Installation:

Asset List:

materials:
    statusicon_afk
images:
    statusicon_afk
    death_crush
  • Copy and Paste zoro/_afkplus.gsc in your mod.
  • Open maps/mp/gametypes/_globallogic.gsc and in the last line of init(), paste:
    thread zoro\_afkplus::init();
    
  • Copy and Paste materials/statusicon_afk, material_properties/statusicon_afk, images/statusicon_afk.iwi, techsets/hud_statusicon_afk.techset, techsets/sm2/hud_statusicon_afk.techset, techniques/tech_statusicon_afk.tech, shader_bin/shader_src/ps_3_0_2d_statusicon.hlsl, shader_bin/shader_src/vs_3_0_2d_statusicon.hlsl and statemaps/default2d_alpha.sm in cod4/raw/
  • Compile .hlsl file pair using this guide. Command will be shader_tool 2d_statusicon_afk.
  • Add this in mod.csv and compile
    material,statusicon_afk
    
  • Add images/statusicon_afk.iwi and images/death_crush.iwi in your IWD.

Screenshots:

image image image

Spray Script

Asset List:

materials:
    all materials containing "spray" in their name
images:
    all images containing "spray" in their name
sounds:
    spray/sprayer.wav

Features:

  • Players can choose to render the sprays or not
  • Customizable button to spray
  • Cooldown between each spray
  • Can have any number of sprays
  • Sprays are preserved and re-rendered for all currently playing players every round
  • Spray sound also included

Installation:

  • Copy and paste zoro\_spray.gsc
  • Open maps/mp/gametypes/_globallogic.gsc and in the last line of init(), paste:
    thread zoro\_spray::init();
    
  • Copy and Paste fx/spray, images/<spray>, materials/<spray>, material_properties/<spray>, mp/sprayTable.csv, soundalias/spray, sound/spray/sprayer.wav, ui_mp/scriptmenus/vfspray.menu into your cod4/raw/
  • Copy and paste all items from mod.txt to mod.csv
  • Add a button preferably in class.menu to open the spray menu
    CHOICE_BUTTON( 2, "Spray Settings", close self;open "spray"; )
    
  • Compile mod
  • Add images/<spray> and sound/spray/sprayer.wav into IWD

Screenshots:

sprayingame spraymenu

Ping Script

Asset List:

materials:
    compass_ping
images:
    images/compass_ping.iwi

Features:

  • Pings only visible to teammates
  • Pinging player is highlighted in the minimap
  • Players can only ping if they're alive
  • Visible to spectators and in killcams
  • Pings appear through wall and across map
  • Pings are marked in minimap

Installation:

  • Copy and paste zoro\_ping.gsc
  • Open maps/mp/gametypes/_globallogic.gsc and in the last line of init(), paste:
    thread zoro\_ping::init();
    
  • Copy and paste images/headicon_dead.iwi, images/compass_ping.iwi, materials/compass_ping, material_properties/compass_ping`
  • Add a bind button anywhere
    CHOICE_BIND( 5, "Ping", "openscriptmenu vf ping", ; )
    
  • Add this in mod.csv and compile:
    material,compass_ping
    
  • Add images/headicon_dead.iwi and images/compass_ping to IWD

Screenshots:

Image from Gyazo