Skip to content

Commit

Permalink
Merge pull request #1088 from openmultiplayer/IsPlayerUsingOmp
Browse files Browse the repository at this point in the history
Add IsPlayerUsingOmp to the docs
  • Loading branch information
midosvt authored Jan 12, 2025
2 parents a6cdda6 + 90db922 commit 954c6e2
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/scripting/functions/IsPlayerUsingOfficialClient.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ public OnPlayerConnect(playerid)
## Related Functions
- [IsPlayerUsingOmp](IsPlayerUsingOmp): Check if the player is using the open.mp launcher.
- [SendClientCheck](SendClientCheck): Perform a memory check on the client.
46 changes: 46 additions & 0 deletions docs/scripting/functions/IsPlayerUsingOmp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
title: IsPlayerUsingOmp
description: Check if the player is using the open.mp launcher.
tags: ["player"]
---

<VersionWarn version='omp 1.4.0.2779' />

## Description

Check if the player is using the open.mp launcher.

| Name | Description |
| -------- | ----------------------------------------------------------- |
| playerid | The ID of the player to check. |

## Returns

Returns 1 if the player is using the open.mp launcher, otherwise 0.

## Examples

```c
public OnPlayerConnect(playerid)
{
// Player is using the open.mp launcher
if(IsPlayerUsingOmp(playerid))
{
SendClientMessage(playerid, -1, "You are using the open.mp launcher.");
}

// Player is not using the open.mp launcher
else
{
SendClientMessage(playerid, 0xFF0000FF, "[KICK]: You don't seem to be using the open.mp launcher");
Kick(playerid);
}

return 1;
}
```
## Related Functions
- [IsPlayerUsingOfficialClient](IsPlayerUsingOfficialClient): Check if the player is using the official SA-MP client.
- [SendClientCheck](SendClientCheck): Perform a memory check on the client.
1 change: 1 addition & 0 deletions docs/scripting/functions/SendClientCheck.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public OnClientCheckResponse(playerid, actionid, memaddr, retndata)
## Related Functions
- [IsPlayerUsingOfficialClient](IsPlayerUsingOfficialClient): Check if the player is using the official SA-MP client.
- [IsPlayerUsingOmp](IsPlayerUsingOmp): Check if the player is using the open.mp launcher.
## Related Callbacks
Expand Down
1 change: 1 addition & 0 deletions docs/server/omp-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ This page contains all the functions and callbacks that were added in open.mp
| [GetDefaultPlayerColour](../scripting/functions/GetDefaultPlayerColour) |
| [PlayerHasClockEnabled](../scripting/functions/PlayerHasClockEnabled) |
| [IsPlayerUsingOfficialClient](../scripting/functions/IsPlayerUsingOfficialClient) |
| [IsPlayerUsingOmp](../scripting/functions/IsPlayerUsingOmp) |
| [IsPlayerInDriveByMode](../scripting/functions/IsPlayerInDriveByMode) |
| [IsPlayerCuffed](../scripting/functions/IsPlayerCuffed) |
| [SetPlayerAdmin](../scripting/functions/SetPlayerAdmin) |
Expand Down

0 comments on commit 954c6e2

Please sign in to comment.