Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ecs): Stop showing a gametext style for all players #446

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/SampSharp.Entities/SAMP/Services/IWorldService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,15 @@ PlayerTextLabel CreatePlayerTextLabel(EntityId player, string text, Color color,
/// <param name="style">The style of text to be displayed.</param>
void GameText(string text, int time, int style);

/// <summary>
/// Stop showing a gametext style for all players.
/// </summary>
/// <param name="style">The style of text to hide.</param>
/// <remarks>
/// This function was added in <c>omp v1.1.0.2612</c> and will not work in earlier versions!
/// </remarks>
void HideGameText(int style);

/// <summary>Creates an explosion for all players.</summary>
/// <param name="position">The position of the explosion.</param>
/// <param name="type">The explosion type.</param>
Expand Down
6 changes: 6 additions & 0 deletions src/SampSharp.Entities/SAMP/Services/WorldService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,12 @@ public void GameText(string text, int time, int style)
_native.GameTextForAll(text, time, style);
}

/// <inheritdoc />
public void HideGameText(int style)
{
_native.HideGameTextForAll(style);
}

/// <inheritdoc />
public void CreateExplosion(Vector3 position, ExplosionType type, float radius)
{
Expand Down
6 changes: 6 additions & 0 deletions src/SampSharp.Entities/SAMP/Services/WorldServiceNative.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@ public virtual bool GameTextForAll(string text, int time, int style)
throw new NativeNotImplementedException();
}

[NativeMethod]
public virtual void HideGameTextForAll(int style)
{
throw new NativeNotImplementedException();
}

[NativeMethod]
public virtual bool CreateExplosion(float x, float y, float z, int type, float radius)
{
Expand Down
Loading