Skip to content

Commit 954c6e2

Browse files
authored
Merge pull request #1088 from openmultiplayer/IsPlayerUsingOmp
Add IsPlayerUsingOmp to the docs
2 parents a6cdda6 + 90db922 commit 954c6e2

File tree

4 files changed

+49
-0
lines changed

4 files changed

+49
-0
lines changed

docs/scripting/functions/IsPlayerUsingOfficialClient.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,5 @@ public OnPlayerConnect(playerid)
3535
3636
## Related Functions
3737
38+
- [IsPlayerUsingOmp](IsPlayerUsingOmp): Check if the player is using the open.mp launcher.
3839
- [SendClientCheck](SendClientCheck): Perform a memory check on the client.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
title: IsPlayerUsingOmp
3+
description: Check if the player is using the open.mp launcher.
4+
tags: ["player"]
5+
---
6+
7+
<VersionWarn version='omp 1.4.0.2779' />
8+
9+
## Description
10+
11+
Check if the player is using the open.mp launcher.
12+
13+
| Name | Description |
14+
| -------- | ----------------------------------------------------------- |
15+
| playerid | The ID of the player to check. |
16+
17+
## Returns
18+
19+
Returns 1 if the player is using the open.mp launcher, otherwise 0.
20+
21+
## Examples
22+
23+
```c
24+
public OnPlayerConnect(playerid)
25+
{
26+
// Player is using the open.mp launcher
27+
if(IsPlayerUsingOmp(playerid))
28+
{
29+
SendClientMessage(playerid, -1, "You are using the open.mp launcher.");
30+
}
31+
32+
// Player is not using the open.mp launcher
33+
else
34+
{
35+
SendClientMessage(playerid, 0xFF0000FF, "[KICK]: You don't seem to be using the open.mp launcher");
36+
Kick(playerid);
37+
}
38+
39+
return 1;
40+
}
41+
```
42+
43+
## Related Functions
44+
45+
- [IsPlayerUsingOfficialClient](IsPlayerUsingOfficialClient): Check if the player is using the official SA-MP client.
46+
- [SendClientCheck](SendClientCheck): Perform a memory check on the client.

docs/scripting/functions/SendClientCheck.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ public OnClientCheckResponse(playerid, actionid, memaddr, retndata)
6464
## Related Functions
6565
6666
- [IsPlayerUsingOfficialClient](IsPlayerUsingOfficialClient): Check if the player is using the official SA-MP client.
67+
- [IsPlayerUsingOmp](IsPlayerUsingOmp): Check if the player is using the open.mp launcher.
6768
6869
## Related Callbacks
6970

docs/server/omp-functions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ This page contains all the functions and callbacks that were added in open.mp
4646
| [GetDefaultPlayerColour](../scripting/functions/GetDefaultPlayerColour) |
4747
| [PlayerHasClockEnabled](../scripting/functions/PlayerHasClockEnabled) |
4848
| [IsPlayerUsingOfficialClient](../scripting/functions/IsPlayerUsingOfficialClient) |
49+
| [IsPlayerUsingOmp](../scripting/functions/IsPlayerUsingOmp) |
4950
| [IsPlayerInDriveByMode](../scripting/functions/IsPlayerInDriveByMode) |
5051
| [IsPlayerCuffed](../scripting/functions/IsPlayerCuffed) |
5152
| [SetPlayerAdmin](../scripting/functions/SetPlayerAdmin) |

0 commit comments

Comments
 (0)