Update GSC: New functions and methods
parent
b4caba90d7
commit
3eae784e6f
@ -24,12 +24,12 @@ Example:
|
|||||||
Mostly the new methods use the player only. Next, you can see the new features that have been added specifically for IW3SP-MOD and can't be called for stock game version.
|
Mostly the new methods use the player only. Next, you can see the new features that have been added specifically for IW3SP-MOD and can't be called for stock game version.
|
||||||
|
|
||||||
# Functions
|
# Functions
|
||||||
* ``exec(<string> command)``: Executes a console command
|
* ``Exec(<string> command)``: Executes a console command
|
||||||
* ``ToUpper(<string> text)``: Converts text to uppercase
|
* ``ToUpper(<string> text)``: Converts text to uppercase
|
||||||
|
|
||||||
## Weapon
|
## Weapon
|
||||||
* ``getweapondamage(<string> weapon name)``: Gets damage from a specific weapon
|
* ``GetWeaponDamage(<string> weapon name)``: Gets damage from a specific weapon
|
||||||
* ``setweapondamage(<string> weapon name, <int> value)``: Sets the damage for a specific weapon
|
* ``SetWeaponDamage(<string> weapon name, <int> value)``: Sets the damage for a specific weapon
|
||||||
* ``PlayViewmodelFX(<string> FX, <string> tag_name)``: Plays the FX on viewmodel weapon. Do not use loop FX, otherwise you can't delete this fx.
|
* ``PlayViewmodelFX(<string> FX, <string> tag_name)``: Plays the FX on viewmodel weapon. Do not use loop FX, otherwise you can't delete this fx.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
@ -42,10 +42,10 @@ player_play_fx_test()
|
|||||||
```
|
```
|
||||||
|
|
||||||
## Discord
|
## Discord
|
||||||
* ``setdiscorddetails(<string> detail_name)``: Sets the detail status in discord rpc
|
* ``SetDiscordDetails(<string> detail_name)``: Sets the detail status in discord rpc
|
||||||
* ``setdiscordstate(<string> state_name)``: Sets the state status in discord rpc
|
* ``SetDiscordState(<string> state_name)``: Sets the state status in discord rpc
|
||||||
* ``setbuttoninformation(<string> label, <string> url)``: Setup the second button in discord rpc
|
* ``SetButtonInformation(<string> label, <string> url)``: Setup the second button in discord rpc
|
||||||
* ``setdiscordimage(<string> image_url)``: Sets the image in discord rpc
|
* ``SetDiscordImage(<string> image_url)``: Sets the image in discord rpc
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
```c
|
```c
|
||||||
@ -53,20 +53,19 @@ main()
|
|||||||
{
|
{
|
||||||
maps\_load::main();
|
maps\_load::main();
|
||||||
wait 4;
|
wait 4;
|
||||||
// Localized strings also supported
|
// P.S: Localized strings also supported
|
||||||
setdiscorddetails("I go sleep!");
|
SetDiscordDetails("I go sleep!");
|
||||||
setdiscordstate("I'm serious...");
|
SetDiscordState("I'm serious...");
|
||||||
setbuttoninformation("MEGA MOD (YouTube link)", "https://www.youtube.com/watch?v=2Z4m4lnjxkY");
|
SetButtonInformation("MEGA MOD (YouTube link)", "https://www.youtube.com/watch?v=2Z4m4lnjxkY");
|
||||||
setdiscordimage("https://media.tenor.com/fym4GQjsCRcAAAAM/kekwtf.gif");
|
SetDiscordImage("https://media.tenor.com/fym4GQjsCRcAAAAM/kekwtf.gif");
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
# Player methods
|
# Player methods
|
||||||
* ``allowFire <bool value>``: Enables/Disables player fire
|
* ``AllowFire <bool value>``: Enables/Disables player fire
|
||||||
* ``IsReloading()``: Checks state if player is reloading
|
* ``IsReloading()``: Checks state if player is reloading
|
||||||
* ``IsSprinting()``: Checks state if player is sprinting
|
* ``IsSprinting()``: Checks state if player is sprinting
|
||||||
* ``IsUsingNVG()``: Checks state if player is uses NVG
|
* ``IsUsingNVG()``: Checks state if player is uses NVG
|
||||||
* ``isMantling()``: Checks state if player is mantling
|
* ``IsMantling()``: Checks state if player is mantling
|
||||||
* ``isSwapping()``: Checks state if player is swapping the weapon
|
* ``IsSwapping()``: Checks state if player is swapping the weapon
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user