-
Notifications
You must be signed in to change notification settings - Fork 394
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1088 from openmultiplayer/IsPlayerUsingOmp
Add IsPlayerUsingOmp to the docs
- Loading branch information
Showing
4 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters