GSC Functions


A list of GSC Functions we have implemented.

Function Usage IW4x IW6x S1x Description
GetPing self GetPing() ✓ X X Get a Client's Ping.
GetIP self GetIp() ✓ X X Get a Client's IP.
SetPing self SetPing(int) ✓ X X Set a Client's IP.
Exec Exec(string) ✓ X X Execute a command.
ExecuteCommand ExecuteCommand(string) X ✓ ✓ Execute a command.
PrintConsole PrintConsole(string) ✓ X X Print to the console.
GetSystemTime GetSystemTime() ✓ X X Get the current system time.
GetSystemTimeMilliseconds GetSystemTimeMilliseconds() ✓ X X Get the current system time in Milliseconds.
ToUpper ToUpper(string) ✓ X X Converts a string to upper case.
StrICmp StrICmp(string, string) ✓ ✓ ✓ Compares substrings without case sensitivity.
IsEndStr IsEndStr(string, string) ✓ ✓ ✓ Checks if a string ends with another given string.
IsArray IsArray(object) ✓ ✓ ✓ Checks if a given Object is an Array.
CastFloat CastFloat(string input) ✓ X X Casts a string or integer to float.
Float Float(string input) X ✓ ✓ Casts a string or integer to float.
Strtol Strtol(string, int) ✓ X X Casts a string to an integer.
GetChar GetChar(string input, int index) ✓ X X Gets the ASCII value of the character at "index" position from a string.
FileWrite FileWrite(string filepath, string input, string mode) ✓ X X Writes a file containing input to the "scriptdata" folder using the specified mode.
FileRemove FileRemove(string filepath) ✓ X X Deletes a file from the "scriptdata" folder.
FileRead FileRead(string filepath) ✓ X X Reads a given file from the "scriptdata" folder.
FileExists FileExists(string filepath) ✓ X X Checks if a given file exists in the "scriptdata" folder.
StorageSet StorageSet(string key, string data) ✓ X X Writes Data to script storage.
StorageRemove StorageRemove(string key) ✓ X X Removes Data from script storage.
StorageGet StorageGet(string key) ✓ X X Gets Data from script storage.
StorageHas StorageHas(string key) ✓ X X Checks if Data exists in script storage.
StorageDump StorageDump() ✓ X X Dumps all Data in script storage to a json file.
StorageLoad StorageLoad() ✓ X X Reads data from the "script storage" json file archive.
StorageClear StorageClear() ✓ X X Clears all Data in script storage.
DisableWeaponPickup DisableWeaponPickup() ✓ X X Disables weapon pickup.
EnableWeaponPickup EnableWeaponPickup() ✓ X X Enables weapon pickup.
IsBot self IsBot() ✓ X X Checks if the Player is a Bot.
IsTestClient self IsTestClient() ✓ X X Checks if the Player is a Testclient.
BotStop bot BotStop() ✓ X X When called on a Bot the bot stops moving.
BotWeapon bot BotWeapon(string) ✓ X X Gives a Weapon to a Bot.
BotAction bot BotAction(string action) ✓ X X Bot carries out an Action.
BotMovement bot BotMovement(int, int) ✓ X X Bot moves into a given Direction.
SetName self SetName(string) ✓ X X Changes Player Name.
ResetName self ResetName() ✓ X X Resets Player Name to the original value.
SetClanTag self SetClanTag(string) ✓ X X Changes Player Clan Name.
ResetClanTag self ResetClanTag() ✓ X X Resets Player Clan Name to the original value.
ReplaceFunc ReplaceFunc(function, function) ✓ ✓ ✓ Replaces an existing game Function with a custom one.
Int64IsInt Int64IsInt(string input) ✓ X X Checks if input is representable as a 32-bit signed integer.
Int64ToInt Int64ToInt(string input) ✓ X X Converts input to a 32-bit signed integer.
Int64OP Int64OP(string a, string operation, string b) ✓ X X Performs a int-64 operation on a and b.
IsSprinting self IsSprinting() ✓ X X Check if a client is sprinting.
InitialWeaponRaise self InitialWeaponRaise(string weapon) ✓ X X Black Ops 2 compatibility function.
OnPlayerSay OnPlayerSay( function(ent player, string message, string mode) ) ✓ X X Chat callback function.
GetStat self GetStat(int index) ✓ X X Call of Duty 4 compatibility function.
SetStat self SetStat(int, int) ✓ X X Call of Duty 4 compatibility function.