SetWeather: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
No edit summary
Line 12: Line 12:
==Example==
==Example==
{{CSharpContainer|
{{CSharpContainer|
{{Parameters}}
*'''weather:''' parameter input should be in '''string''' or '''Weather''' type
{{Example}}
{{Example}}
<syntaxhighlight lang="C#">
{{#tag:syntaxhighlight|
[Command("clrweather", Description = "Clears the weather")]
[Command("clrweather", Description = "Clears the weather")]
public void Clear_Weather(Client player)
public void Clear_Weather(Client player)
{
{
     NAPI.World.SetWeather(Weather.CLEAR);
     {{Template:CSharp_Serverside_namespace}}World.SetWeather(Weather.CLEAR);
}
}
</syntaxhighlight>
 
|lang=csharp}}
}}
}}
[[Category:Serverside API]]
[[Category:Serverside API]]

Revision as of 13:35, 27 November 2019

Sets the weather.


Syntax

void NAPI.World.SetWeather(string weather);
void NAPI.World.SetWeather(Weather weather);

Required Arguments

  • weather: parameter input should be in string or Weather type


Example

C# Syntax

Parameters

  • weather: parameter input should be in string or Weather type

Example

[Command("clrweather", Description = "Clears the weather")]
public void Clear_Weather(Client player)
{
    NAPI.World.SetWeather(Weather.CLEAR);
}