Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ocalasans/verificacao-plataforma
Include VerificacaoPlataforma para SA:MP (San Andreas Multiplayer)
https://github.com/ocalasans/verificacao-plataforma
gta include pawn pawno sa-mp samp
Last synced: 4 days ago
JSON representation
Include VerificacaoPlataforma para SA:MP (San Andreas Multiplayer)
- Host: GitHub
- URL: https://github.com/ocalasans/verificacao-plataforma
- Owner: ocalasans
- License: apache-2.0
- Created: 2023-03-26T03:34:36.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-16T12:37:17.000Z (7 months ago)
- Last Synced: 2024-04-16T15:16:30.072Z (7 months ago)
- Topics: gta, include, pawn, pawno, sa-mp, samp
- Language: Pawn
- Homepage: https://abre.ai/samp-spc
- Size: 43 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.eng.md
- License: LICENSE
Awesome Lists containing this project
README
## Include VerificacaoPlataforma SA:MP
This is a code snippet designed to check whether the player is using a `mobile` or a `computer`. Read the categories below to stay informed.
-----------------------
### How to install?
You should download the include. After doing so, you need to place the include in the folder (pawno > include). Once you have done that, open the pwn file of your Gamemode and insert the following code below your other includes:
```pawn
#include
```-----------------------
### Required include
* [Pawn.RakNet](https://github.com/katursis/Pawn.RakNet).
> [!WARNING]
> If the user has not activated the [Pawn.RakNet](https://github.com/katursis/Pawn.RakNet) library, they will receive an error number `111`.-----------------------
### How does it work?
Once the player connects to the server, the include automatically checks which platform they are using, whether it's `mobile` or `computer`, with the assistance of [Pawn.RakNet](https://github.com/katursis/Pawn.RakNet). To verify the player's platform, simply use the boolean function `IsPlayerAndroid`. Below are some examples:
With the `if`:
```pawn
CMD:platform(playerid)
{
if(IsPlayerAndroid(playerid))
SendClientMessage(playerid, 0xFFFFFFFF, "You are connected via the Mobile platform.");
//
else if(!IsPlayerAndroid(playerid)) // Could be just else.
SendClientMessage(playerid, 0xFFFFFFFF, "You are connected via the Computer platform.");
//
return true;
}
```Without the `if`:
```pawn
CMD:platform(playerid)
{
new string[128];
//
format(string, sizeof(string), "You are connected via the %s platform.", IsPlayerAndroid(playerid) ? ("Mobile") : ("Computer"));
SendClientMessage(playerid, 0xFFFFFFFF, string);
//
return true;
}
```-----------------------
This include also has a function called `PlayerHasAutoAim`. This function is designed to check whether the player has automatic aiming enabled or if it is without automatic aiming, commonly known as `LockOn`. Below are some examples:
With the `if`:
```pawn
CMD:aim(playerid)
{
if(PlayerHasAutoAim(playerid))
SendClientMessage(playerid, 0xFFFFFFFF, "Your auto-aim is Enabled.");
//
else if(!PlayerHasAutoAim(playerid)) // Could be just else.
SendClientMessage(playerid, 0xFFFFFFFF, "Your auto-aim is Disabled.");
//
return true;
}
```Without the `if`:
```pawn
CMD:aim(playerid)
{
new string[128];
//
format(string, sizeof(string), "Your auto-aim is %s.", PlayerHasAutoAim(playerid) ? ("Enabled") : ("Disabled"));
SendClientMessage(playerid, 0xFFFFFFFF, string);
//
return true;
}
```-----------------------
### Contact Information
Instagram: [ocalasans](https://instagram.com/ocalasans)
YouTube: [Calasans](https://www.youtube.com/@ocalasans)
Discord: ocalasans
Community: [SA:MP Programming Community©](https://abre.ai/samp-spc)