Skip to content

Commit 93574b0

Browse files
authored
Merge pull request #1126 from itsneufox/translationPTBR2
Add documentation for various scripting functions in Portuguese
2 parents fe07169 + 74353d0 commit 93574b0

File tree

15 files changed

+561
-0
lines changed

15 files changed

+561
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
title: AddServerRule
3+
sidebar_label: AddServerRule
4+
description: Adicionar uma regra do servidor.
5+
tags: ["rule"]
6+
---
7+
8+
<VersionWarn version='omp v1.1.0.2612' />
9+
10+
## Descrição
11+
12+
Adicionar uma regra do servidor.
13+
14+
| Nome | Descrição |
15+
| ---------------- | ------------------------------------------ |
16+
| const rule[] | O nome da regra do servidor a adicionar. |
17+
| const format[] | O valor da regra do servidor. |
18+
| OPEN_MP_TAGS:... | Número indefinido de argumentos de qualquer tag. |
19+
20+
## Retorno
21+
22+
Retorna true se a função foi executada com sucesso, caso contrário false.
23+
24+
## Exemplos
25+
26+
```c
27+
public OnGameModeInit()
28+
{
29+
AddServerRule("discord", "discord.gg/samp");
30+
return 1;
31+
}
32+
```
33+
34+
## Funções Relacionadas
35+
36+
- [RemoveServerRule](RemoveServerRule): Remove a regra do servidor.
37+
- [IsValidServerRule](IsValidServerRule): Verifica se a regra do servidor fornecida é válida.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: AllowNickNameCharacter
3+
sidebar_label: AllowNickNameCharacter
4+
description: Permite que um caractere seja usado no nome de usuário.
5+
tags: []
6+
---
7+
8+
<VersionWarn version='omp v1.1.0.2612' />
9+
10+
## Descrição
11+
12+
Permite que um caractere seja usado no nome de usuário.
13+
14+
| Nome | Descrição |
15+
| ---------- | --------------------------------------- |
16+
| character | O caractere a permitir ou não permitir. |
17+
| bool:allow | true-Permitir, false-Não permitir |
18+
19+
## Retorno
20+
21+
Esta função não retorna valores específicos.
22+
23+
## Exemplos
24+
25+
```c
26+
public OnGameModeInit()
27+
{
28+
AllowNickNameCharacter('*', true); // Permitir char *
29+
AllowNickNameCharacter('[', false); // Não permitir char [
30+
AllowNickNameCharacter(']', false); // Não permitir char ]
31+
return 1;
32+
}
33+
```
34+
## Funções Relacionadas
35+
36+
- [IsNickNameCharacterAllowed](IsNickNameCharacterAllowed): Verifica se um caractere é permitido no nome de usuário.
37+
- [IsValidNickName](IsValidNickName): Verifica se um nome de usuário é válido.
38+
- [SetPlayerName](SetPlayerName): Define o nome de um jogador.
39+
- [GetPlayerName](GetPlayerName): Obtém o nome de um jogador.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title: AllowPlayerTeleport
3+
sidebar_label: AllowPlayerTeleport
4+
description: Ativar/Desativar a habilidade de teletransporte para um jogador clicando com o botão direito no mapa.
5+
tags: ["player"]
6+
---
7+
8+
:::warning
9+
10+
Esta função, a partir da versão 0.3d, está depreciada. Veja [OnPlayerClickMap](../callbacks/OnPlayerClickMap).
11+
12+
:::
13+
14+
## Descrição
15+
16+
Ativar/Desativar a habilidade de teletransporte para um jogador clicando com o botão direito no mapa
17+
18+
| Nome | Descrição |
19+
| ---------- | -------------------------------------------- |
20+
| playerid | O ID do jogador para permitir teletransporte. |
21+
| bool:allow | 'false' para desativar e 'true' para ativar. |
22+
23+
## Retorno
24+
25+
Esta função não retorna valores específicos.
26+
27+
## Exemplos
28+
29+
```c
30+
public OnPlayerConnect(playerid)
31+
{
32+
// Permite que o jogador se teletransporte clicando com o botão direito no mapa
33+
// como isso está em OnPlayerConnect, será feito para CADA jogador
34+
AllowPlayerTeleport(playerid, true);
35+
return 1;
36+
}
37+
```
38+
## Notas
39+
40+
:::warning
41+
42+
Esta função funcionará apenas se [AllowAdminTeleport](AllowAdminTeleport) estiver ativada, e você precisa ser um administrador.
43+
44+
:::
45+
46+
## Funções Relacionadas
47+
48+
- [IsPlayerTeleportAllowed](IsPlayerTeleportAllowed): Este jogador pode se teletransportar clicando com o botão direito no mapa?
49+
- [AllowAdminTeleport](AllowAdminTeleport): Alterna o teletransporte por waypoint para administradores RCON.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
title: AllowPlayerWeapons
3+
sidebar_label: AllowPlayerWeapons
4+
description: Ativar/Desativar armas para um jogador.
5+
tags: ["player"]
6+
---
7+
8+
<VersionWarn version='omp v1.1.0.2612' />
9+
10+
## Descrição
11+
12+
Ativar/Desativar armas para um jogador.
13+
14+
| Nome | Descrição |
15+
| ---------- | --------------------------------------- |
16+
| playerid | O ID do jogador para permitir armas |
17+
| bool:allow | true para permitir e false para negar. |
18+
19+
## Retorno
20+
21+
Esta função sempre retorna true.
22+
23+
## Exemplos
24+
25+
```c
26+
public OnPlayerConnect(playerid)
27+
{
28+
AllowPlayerWeapons(playerid, true);
29+
return 1;
30+
}
31+
```
32+
33+
## Funções Relacionadas
34+
35+
- [ArePlayerWeaponsAllowed](ArePlayerWeaponsAllowed): O jogador pode usar armas?
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
title: AreAllAnimationsEnabled
3+
sidebar_label: AreAllAnimationsEnabled
4+
description: As animações ausentes em algumas versões estão habilitadas?
5+
tags: ["animation"]
6+
---
7+
8+
<VersionWarn version='omp v1.1.0.2612' />
9+
10+
## Descrição
11+
12+
As animações ausentes em algumas versões estão habilitadas?
13+
14+
## Retorno
15+
16+
true: Habilitado.
17+
false: Desabilitado.
18+
19+
## Exemplos
20+
21+
```c
22+
if (AreAllAnimationsEnabled())
23+
{
24+
// Fazer algo
25+
}
26+
```
27+
## Funções Relacionadas
28+
29+
- [EnableAllAnimations](EnableAllAnimations): Permite o uso das animações ausentes em algumas versões.
30+
- [ApplyAnimation](ApplyAnimation): Aplica uma animação a um jogador.
31+
- [ClearAnimations](ClearAnimations): Remove qualquer animação que um jogador esteja executando.
32+
33+
## Recursos Relacionados
34+
35+
- [Animations](../resources/animations)
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
title: AreInteriorWeaponsAllowed
3+
sidebar_label: AreInteriorWeaponsAllowed
4+
description: Armas podem ser usadas em interiores?
5+
tags: []
6+
---
7+
8+
<VersionWarn version='omp v1.1.0.2612' />
9+
10+
## Descrição
11+
12+
Armas podem ser usadas em interiores?
13+
14+
## Retorno
15+
16+
true: Permitido.
17+
false: Não permitido.
18+
19+
## Exemplos
20+
21+
```c
22+
if (AreInteriorWeaponsAllowed())
23+
{
24+
// Fazer algo
25+
}
26+
```
27+
28+
## Funções Relacionadas
29+
30+
- [AllowInteriorWeapons](AllowInteriorWeapons): Alterna se o uso de armas em interiores é permitido ou não.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
title: ArePlayerWeaponsAllowed
3+
sidebar_label: ArePlayerWeaponsAllowed
4+
description: O jogador pode usar armas?
5+
tags: ["player"]
6+
---
7+
8+
<VersionWarn version='omp v1.1.0.2612' />
9+
10+
## Descrição
11+
12+
O jogador pode usar armas?
13+
14+
| Nome | Descrição |
15+
| -------- | -------------------------------- |
16+
| playerid | O ID do jogador para verificar. |
17+
18+
## Retorno
19+
20+
**true** - Jogador está permitido.
21+
**false** - Jogador não está permitido.
22+
23+
## Exemplos
24+
25+
```c
26+
public OnPlayerSpawn(playerid)
27+
{
28+
if (ArePlayerWeaponsAllowed(playerid))
29+
{
30+
// fazer algo
31+
}
32+
return 1;
33+
}
34+
```
35+
36+
## Funções Relacionadas
37+
38+
- [AllowPlayerWeapons](AllowPlayerWeapons): Ativar/Desativar armas para um jogador.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title: AttachCameraToPlayerObject
3+
sidebar_label: AttachCameraToPlayerObject
4+
description: Anexa a câmera de um jogador a um objeto do jogador.
5+
tags: ["player", "camera"]
6+
---
7+
8+
## Descrição
9+
10+
Anexa a câmera de um jogador a um objeto do jogador. O jogador consegue mover sua câmera enquanto ela está anexada a um objeto. Pode ser usada com MovePlayerObject e AttachPlayerObjectToVehicle.
11+
12+
| Nome | Descrição |
13+
| -------------- | ---------------------------------------------------------------------------------- |
14+
| playerid | O ID do jogador que terá sua câmera anexada a um objeto do jogador. |
15+
| playerobjectid | O ID do objeto do jogador ao qual a câmera do jogador será anexada. |
16+
17+
## Retorno
18+
19+
Esta função não retorna valores específicos.
20+
21+
## Exemplos
22+
23+
```c
24+
public OnPlayerCommandText(playerid, cmdtext[])
25+
{
26+
if (!strcmp(cmdtext, "/attach", false))
27+
{
28+
new playerobject = CreatePlayerObject(playerid, 1245, 0.0, 0.0, 3.0, 0.0, 0.0, 0.0);
29+
AttachCameraToPlayerObject(playerid, playerobject);
30+
SendClientMessage(playerid, 0xFFFFFFAA, "Sua câmera agora está anexada a um objeto.");
31+
return 1;
32+
}
33+
return 0;
34+
}
35+
```
36+
37+
## Notas
38+
39+
:::tip
40+
41+
O objeto do jogador deve ser criado antes de tentar anexar a câmera do jogador a ele.
42+
43+
:::
44+
45+
## Funções Relacionadas
46+
47+
- [AttachCameraToObject](AttachCameraToObject): Anexa a câmera do jogador a um objeto global.
48+
- [SetPlayerCameraPos](SetPlayerCameraPos): Define a posição da câmera de um jogador.
49+
- [SetPlayerCameraLookAt](SetPlayerCameraLookAt): Define para onde a câmera de um jogador deve apontar.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: argcount
3+
sidebar_label: argcount
4+
description: Obter o número de argumentos passados para o script (aqueles após --).
5+
tags: ["arguments", "args"]
6+
---
7+
8+
## Descrição
9+
10+
Obter o número de argumentos passados para o script (aqueles após **--**).
11+
12+
## Retorno
13+
14+
O número de argumentos passados diretamente para o script.
15+
16+
## Funções Relacionadas
17+
18+
- [argindex](argindex): Obter o nome do argumento no índice fornecido após --.
19+
- [argstr](argstr): Obter o valor string de um argumento por nome.
20+
- [argvalue](argvalue): Obter o número de argumentos passados para o script (aqueles após --).
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: argindex
3+
sidebar_label: argindex
4+
description: Obter o nome do argumento no índice fornecido após --.
5+
tags: ["arguments", "args"]
6+
---
7+
8+
## Descrição
9+
10+
Obter o nome do argumento no índice fornecido após **--**.
11+
12+
| Nome | Descrição |
13+
| --------------------- | ----------------------------------------------- |
14+
| index | O deslocamento baseado em zero para o argumento do script. |
15+
| value[] | O destino da string de saída. |
16+
| size = sizeof (value) | O tamanho do destino. |
17+
| bool:pack = false | O valor de retorno deve ser empacotado? |
18+
19+
## Retorno
20+
21+
**true** - o argumento foi encontrado, **false** - não foi.
22+
23+
## Notas
24+
25+
Parâmetros separados também contam para o índice aqui.
26+
Por exemplo, com `--load test --run` o argumento `--run` é o índice `2`.
27+
28+
## Funções Relacionadas
29+
30+
- [argcount](argcount): Obter o número de argumentos passados para o script (aqueles após --).
31+
- [argstr](argstr): Obter o valor string de um argumento por nome.
32+
- [argvalue](argvalue): Obter o número de argumentos passados para o script (aqueles após --).

0 commit comments

Comments
 (0)