Sign in to follow this  
Followers 0
Gabe

Script refrence

1 post in this topic

////Player settings
player.name //player's name
player.health //player's health, can be set above their maxhealth
player.maxspeed //max speed they can move at, default 190 (?)
player.maxhealth //health the player spawns with
player.pers["team"] //team of the player. I think these are still allies/axis, because the killplayer script works
player.hasradar //if player has/allowed rader?
player.kills //number of kills
player.headiconteam //team sees this icon above teammate's head
player.headicon //player's icon above their head
player.statusicon //player's icon in scores list
player.deaths //number of deaths
player.sessionstate (allies, axis, none, spectator)
////

setrank() //set's player's rank
updatescores() //updates player's score?
unsetperk() //?
clearperks() //clear's the player's perks
getweaponslistprimaries() //gets list of current primary weapons? (might be just two, max)
getweaponslist() //gets a list of player's current weapons
setactionslot() //what?
setspreadoverride() //sets weapon spread override?
allowsprint() //allow/disallow sprinting for a player
allowjump() //allow/disallow jumping for a player
allowads() //allow aim down sight, default true I suppose
getguid() //gets the short guid of the player
getxuid() //?
istalking() //returns true if they are in the console/chatting?
playlocalsound() //starts a sound playing only for that player
stoplocalsound() //stops a sound playing only for that player
setclientdvar(,) //sets a client (d)variable, like cg_drawfps
cloneplayer() //clones a player, clone isn't like normal player but is used for dead bodies and such...in coduo anyway, not sure here
iprintlnbold("text") //prints a big line in the middle of the screen, if no player is specified then everyone sees it
iprintln("text") //prints a small line on the bottom left of the screen, if no player is specified then everyone sees it
getweaponammostock()
getweaponammoclip()
setweaponammostock()
setweaponammoclip()
enableweapons() //see below
disableweapons() //was disableweapon() in coduo, puts weapons away until they are re-enabled (for one player)
freezecontrols() //might only work in multiplayer, but something is used at the start of MP games to do this
openmenunomouse() //opens a specified menu with no mouse pointer, like show map in coduo
openmenu() //opens a specified menu
suicide() //kills player :D
dropitem() //drops a specified item (weapon)
setspawnweapon() //sets the player's spawning weapon
sayteam() //sends a chat message to the player's team from that player
sayall() //sends a chat message to everyone from a player
buttonpressed() //maybe you can see if any button is pressed by it's name? e.g. F12
getviewmodel() //(edit: viewmodel_hands_new)
setviewmodel() //?
pingplayer() //returns ping of player?
isonground() //returns true if player is touching the floor
playerads() //returns true if player is aimed down sight?


///Button presses, could only use attack, melee, and use buttons in uo :(

fragbuttonpressed() //not sure
meleebuttonpressed() //bash (v not shift :o)
adsbuttonpressed() //aim down sight
attackbuttonpressed() //good old clicking
usebuttonpressed() //activate key
e.g.
if(player(attackbuttonpressed)) iprintlnbold("HEY!");

getplayerangles() //gets the view angles of a player (in coduo we couldn't get the up/down angles, hopefully not the same here)
setplayerangles() //sets the view angles of a player
getvelocity() //gets the current speed of an entity
setorigin() //moves the player to a point on x/y/z
switchtoweapon() //switches the player to a certain weapon/weaponslot?
hasweapon() //returns true if they have that weapon?
getcurrentweapon() //gets the weapon in the player's hand
takeallweapons() //takes all weps off a player
giveweapon() //gives a certain weapon in a certain weapon slot
isonladder() //checks if an entity is on a ladder
setmovespeedscale() //sets the scale of movement speed, default might be 190
playrumbleonentity() //plays a rumble on an entity?
stoploopsound() //stops the looping sound on an entity
playloopsound() //plays a looping sound on an entity
playsoundtoplayer() //plays sound to one player
playsoundtoteam() //plays a sound to one team
playsound() //plays a sound on an entity like a script_model/player
istouching() //if one element is touching another
e.g. if(thing1(istouching(thing2)) iprintlnbold("boo");

ambientstop() //stops the ambient sound
ambientplay() //plays an ambient (usually looping) sound
setExpFog( , , R, G, B, ? (cullrange) );

/////Hud scripting
destroy() //deletes hud element
moveovertime() //moves it to diff point on the screen, over time
scaleovertime() //resizes the element over time
fadeovertime() //fades the element over time
glowalpha //same as below, transparency
glowcolor //new thing, guess it controls the glowy text color
hidewhendead //guess: hides the element when player is dead
hidewheninmenu //guess: hides the element if the player has a menu up
sort //sort order on screen
label //?
alpha //transparency from 0 to 1
color //color of hudelem...?
vertalign //?
horzalign //?
aligny //aligns the element on y
alignx //aligns the element on x
fontscale //sets size of font
setText() //sets text on a hudelement
/////


And, in that section of the gsc is an interesting little dvar: 
"g_playerCollisionEjectSpeed"
(Speed at which to push intersecting players away from each other)

////Vehicle stuff
setdamagestage() //?
setvehicleteam() //sets vehicle's owner team
clearturrettarget() //?
setturrettargetent() //?
setturrettargetvec() //?
fireweapon() //fires the turret/main weapon
setvehweapon() //sets the vehicle's weapon
getspeedmph() //speed in mph 
getspeed() //speed in...something else...game units maybe? (like inches)
setspeed() //sets speed in game units
////

////Precaching
precachelocationselector() //where you can choose to spawn
precacheheadicon() //icons above player's heads
precachestatusicon() //icons next to player names in scores
precachemenu() //menu files, like main menu/weapon menu
precacherumble() //new thingy, dunno what it does :o
precachestring() //precaches text to be used in hud stuff
precacheshader() //eg gfx/hud/hud@artillery_fire.tga or something
precacheitem() //use this to precache weapon files
precacheshellshock() //precaches a .shock file (coduo)
precachemodel() //precaches any xmodel
precacheturret() //guessing it gets the turret's model and wep file
////


Random example of external code:

maps\mp\_fx::OneShotfx( effectname, (x y z), predelay);

Plays  once at x,y,z after  seconds

and some other stuff

Known FX

oadfx("explosions/tanker_explosion");
loadfx("weather/snow_wind");
loadfx("smoke/hallway_smoke_light");
loadfx("weather/snow_light_mp_bloc");
loadfx("ambient_runners/mp_bog_horizon_flash");
loadfx("smoke/battlefield_smokebank_bog_a");
loadfx("weather/fog_bog_a");
loadfx("misc/antiair_runner_night");
loadfx("fire/firelp_barrel_pm");
loadfx("explosions/grenadeExp_concrete_1");
loadfx("explosions/grenadeExp_dirt_1");
loadfx("explosions/grenadeExp_wood");
loadfx("explosions/grenadeExp_wood");
loadfx("explosions/grenadeExp_dirt_1");
loadfx("explosions/grenadeExp_concrete_1");
loadfx("explosions/grenadeExp_concrete_1");
loadfx("weather/rain_mp_cargoship");
loadfx("weather/lightning_mp_farm");
loadfx("misc/cgoshp_drips");
loadfx("misc/cgoshp_drips_a");
loadfx("weather/rain_noise");
loadfx("weather/rain_noise_ud");
loadfx("ambient_runners/mp_cargoship_rain_noise01");
loadfx("ambient_runners/mp_cargoship_rain_noise02");
loadfx("ambient_runners/mp_cargoship_rain_noise03");
loadfx("ambient_runners/mp_cargoship_rain_noise04");
loadfx("ambient_runners/mp_cargoship_rain_noise05");
loadfx("ambient_runners/mp_cargoship_rain_noise_ud01");
loadfx("ambient_runners/mp_cargoship_rain_noise_ud02");
loadfx("ambient_runners/mp_cargoship_rain_noise_ud03");
loadfx("weather/fog_bog_a");
loadfx("smoke/amb_ash");
loadfx("misc/floodlight_white");
loadfx("misc/fluorescent_glow");
loadfx("misc/floodlight_yellow");
loadfx("dust/dust_wind_fast");
loadfx("dust/dust_spiral_runner");
loadfx("fire/firelp_small_pm");
loadfx("fire/firelp_small_pm_a");
loadfx("smoke/thin_black_smoke_L");
loadfx("smoke/battlefield_smokebank_S");
loadfx("fire/tank_fire_turret_abrams");
loadfx("fire/tank_fire_hatch");
loadfx("fire/firelp_med_pm_nodistort");	
loadfx("fire/firelp_small_pm");
loadfx("fire/firelp_small_pm_a");
loadfx("dust/dust_wind_fast");
loadfx("dust/dust_wind_slow_yel_loop");
loadfx("dust/dust_spiral_runner");
loadfx("smoke/battlefield_smokebank_S");
loadfx("smoke/hallway_smoke_light");
loadfx("dust/dust_wind_slow_yel_loop");
loadfx("smoke/thin_black_smoke_L");
loadfx("smoke/thin_black_smoke_M");
loadfx("smoke/battlefield_smokebank_S");
loadfx("misc/paper_falling");
loadfx("ambient_runners/mp_farm_rain_splash01");
loadfx("ambient_runners/mp_farm_water_noise01");
loadfx("ambient_runners/mp_farm_water_noise_ud01");
loadfx("smoke/thin_black_smoke_M");
loadfx("smoke/thin_black_smoke_L");
loadfx("smoke/battlefield_smokebank_S");
loadfx("fire/firelp_small_pm");
loadfx("fire/firelp_small_pm_a");
loadfx("fire/firelp_med_pm_nodistort");
loadfx("misc/leaves_ground_gentlewind");	
loadfx("misc/leaves_fall_gentlewind");
loadfx("misc/insects_carcass_runner");
loadfx("weather/fog_daytime");
loadfx("ambient_runners/mp_overgrown_insects01");
loadfx("ambient_runners/mp_overgrown_insects02");
loadfx("ambient_runners/mp_overgrown_insects03");
loadfx("ambient_runners/mp_overgrown_insects04");
loadfx("ambient_runners/mp_overgrown_insects05");
loadfx("ambient_runners/mp_overgrown_fog_daytime01");
loadfx("ambient_runners/mp_overgrown_leavesfall01");
loadfx("ambient_runners/mp_overgrown_leavesground01");
loadfx("props/glow_latern");
loadfx("explosions/tanker_explosion");
loadfx("smoke/battlefield_smokebank_S");
loadfx("dust/light_shaft_dust_large");	
loadfx("dust/ash_spiral_runner");
loadfx("dust/room_dust_100_blend");	
loadfx("dust/room_dust_200_blend");	
loadfx("dust/dust_ceiling_ash_large");
loadfx("smoke/hallway_smoke_light");
loadfx("misc/bird_seagull_flock_large");
loadfx("weather/jeepride_cloud_bank_far");
loadfx("dust/ash_spiral_runner");
loadfx("smoke/hallway_smoke_light");
loadfx("explosions/clusterbomb");
loadfx("explosions/artilleryExp_dirt_brown");
loadfx("explosions/wall_explosion_pm_a");
loadfx("fire/jet_afterburner");
loadfx("smoke/jet_contrail");
loadfx("treadfx/heli_dust_default");
loadfx("treadfx/heli_water");
loadfx("explosions/default_explosion");
loadfx("explosions/large_vehicle_explosion");

Worldspawn settings example:
"sunRadiosity" ".7"
"sunlight" "0.5"
"sundirection" "-22 247 0"
"sundiffusecolor" "0.717647 0.776471 1.000000"
"suncolor" ".68 .72 .76"
"northyaw" "90"
"diffusefraction" ".4"
"ambient" "0.125"
"_color" ".67 .72 .94"
"radiosityScale" "1.8"
"classname" "worldspawn"

Some classnames:
worldspawn
info_player_start
mp_global_intermission
mp_dm_spawn
mp_tdm_spawn
mp_dom_spawn
mp_dom_spawn_axis_start
mp_dom_spawn_allies_start
mp_sab_spawn_axis
mp_sab_spawn_allies
mp_sab_spawn_axis_start
mp_sab_spawn_allies_start
mp_sd_spawn_attacker
mp_sd_spawn_defender
script_vehicle
script_origin
script_brushmodel
item_health
grenade
trigger_hurt
trigger_lookat
trigger_multiple
trigger_radius

Model names:
head_mp_usmc_tactical_baseball_cap
body_mp_usmc_sniper
prop_suitcase_bomb
briefcase_bomb_defuse_mp
briefcase_bomb_mp

Some weapon model names:
projectile_hellfire_missile
projectile_sidewinder_missile
weapon_ac130
viewmodel_base_viewhands
viewmodel_C4
viewmodel_ak47_mp
viewmodel_ak47_mp_brock
viewmodel_ak47_gold_mp
viewmodel_ak47_grenadier_mp
viewmodel_ak47_grenadier_mp_brock
viewmodel_ak47_grenadier_mp_bshdwl
viewmodel_ak47_grenadier_mp_bwmrpt
viewmodel_ak47_grenadier_mp_cmdtgr
viewmodel_ak47_grenadier_mp_stagger
viewmodel_ak47_gold_grenadier_mp
weapon_claymore
viewmodel_at4
viewmodel_dragunov_mp
viewmodel_dragunov_mp_brock
viewmodel_dragunov_mp_bshdwl
viewmodel_dragunov_mp_bwmrpt
viewmodel_dragunov_mp_cmdtgr
viewmodel_dragunov_mp_stagger
viewmodel_barrett_mp
viewmodel_barrett_mp_brock
viewmodel_barrett_mp_bshdwl
viewmodel_barrett_mp_bwmrpt
viewmodel_barrett_mp_cmdtgr
viewmodel_barrett_mp_stagger
viewmodel_beretta_mp
viewmodel_beretta_and_silencer_mp
viewmodel_binoculars
viewmodel_USP
weapon_mk2fraggrenade
viewmodel_briefcase_bomb_mp
viewmodel_C4
weapon_c4_mp
viewmodel_knife
projectile_hellfire_missile
viewmodel_colt45_mp
weapon_colt1911_black

source: http://modsonline.com/Forums-top-68089.html

Alternative script refrence: http://zeroy.com/script/

thought it would help somepeople if thyey were having troubles with understanding Zeroy and or needed to know what the script is used for... :dave:

0

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  
Followers 0