Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/blog/2025-02-12-launcher-false-positive.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
slug: launcher-false-positive
title: Windows Defender False Positive on Launcher
authors: itsneufox
authors: [iamir, itsneufox]
---

Some users have reported that **Windows Defender is flagging the open.mp Launcher as a Trojan/virus**. This is a **false positive**, the launcher is completely safe to use.
Expand Down
2 changes: 1 addition & 1 deletion frontend/docs/scripting/functions/EnableTirePopping.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public OnGameModeInit()

- This function was removed in SA-MP 0.3.
- Tire popping is enabled by default.
- If you want to disable tire popping, you'll have to manually script it using [OnVehicleDamageStatusUpdate](OnVehicleDamageStatusUpdate).
- If you want to disable tire popping, you'll have to manually script it using [OnVehicleDamageStatusUpdate](../callbacks/OnVehicleDamageStatusUpdate).

:::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public OnGameModeInit()

:::warning

Ova je funkcija uklonjena u SA-MP 0.3. Pucanje guma je omogućeno prema zadanim postavkama. Ako želite onemogućiti pucanje guma, morat ćete ga ručno skriptati koristeći [OnVehicleDamageStatusUpdate](OnVehicleDamageStatusUpdate).
Ova je funkcija uklonjena u SA-MP 0.3. Pucanje guma je omogućeno prema zadanim postavkama. Ako želite onemogućiti pucanje guma, morat ćete ga ručno skriptati koristeći [OnVehicleDamageStatusUpdate](../callbacks/OnVehicleDamageStatusUpdate).

:::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public OnGameModeInit()

- این تابع در SA-MP 0.3 حذف شده است.
- ترکیدن لاستیک به طور پیش‌فرض فعال است.
- اگر می‌خواهید ترکیدن لاستیک را غیرفعال کنید، باید آن را به صورت دستی با استفاده از [OnVehicleDamageStatusUpdate](OnVehicleDamageStatusUpdate) اسکریپت کنید.
- اگر می‌خواهید ترکیدن لاستیک را غیرفعال کنید، باید آن را به صورت دستی با استفاده از [OnVehicleDamageStatusUpdate](../callbacks/OnVehicleDamageStatusUpdate) اسکریپت کنید.

:::

Expand Down
212 changes: 212 additions & 0 deletions frontend/i18n/pt-BR/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -381,5 +381,217 @@
},
"navbar.item.Donate": {
"message": "Doar"
},
"versionWarn.name.function": {
"message": "função",
"description": "Default item name in a version warning"
},
"versionWarn.name.callback": {
"message": "callback",
"description": "Callback item name in a version warning"
},
"versionWarn.message": {
"message": "Esta {name} foi adicionada no {version} e não funcionará em versões anteriores!",
"description": "Warning shown on scripting docs pages for APIs added in a specific server version"
},
"uid.page.title": {
"message": "Gerador de UID",
"description": "UID generator page title"
},
"uid.page.description": {
"message": "Gere UIDs para usar como identificadores únicos de IComponent ou IExtension",
"description": "UID generator page description"
},
"uid.heading": {
"message": "Gerador de UID de componente",
"description": "UID generator page heading"
},
"uid.instructions.intro": {
"message": "Copie a macro {provideUid} abaixo para seu novo componente, no lugar da macro padrão de provedor de UID. Cada componente deve ter um UID único, por isso o {uniqueLetter} em {uidInitials} ({uniqueIdentifier}). O {provideUid} padrão é inválido e não compilará, para evitar duplicatas ao criar novos componentes a partir de templates.",
"description": "UID generator instructions explaining how to use the generated macro"
},
"uid.instructions.findPlaceholder": {
"message": "Encontre este placeholder:",
"description": "UID generator instruction before the placeholder macro"
},
"uid.instructions.replaceWith": {
"message": "E substitua por:",
"description": "UID generator instruction before the generated replacement macro"
},
"uid.instructions.existingComponent": {
"message": "Se você estiver modificando um componente existente, lembre-se também de substituir o UID existente, que será um valor válido, não um placeholder.",
"description": "UID generator note for modifying an existing component"
},
"lowercaseNote.name.function": {
"message": "função",
"description": "Default item name in a lowercase-name warning"
},
"lowercaseNote.message": {
"message": "Esta {name} começa com uma letra minúscula.",
"description": "Warning shown on scripting docs pages for APIs whose names start with lowercase letters"
},
"npcCallbacksTip.message": {
"message": "Esta callback também pode ser chamada por NPC.",
"description": "Tip shown on callback docs pages when NPCs can also call the callback"
},
"toast.close": {
"message": "Fechar notificação",
"description": "Accessible label for closing a toast notification"
},
"servers.add.successMessage": {
"message": "{serverName} foi adicionado à nossa lista pendente. Se ele não estiver disponível após no máximo 48 horas, você pode entrar em contato conosco no Discord!",
"description": "Toast message shown after submitting a server to the pending list"
},
"servers.add.successTitle": {
"message": "Servidor enviado!",
"description": "Toast title shown after a server submission succeeds"
},
"servers.add.failureMessage": {
"message": "Status {status}: {error}",
"description": "Toast message shown after a server submission fails"
},
"servers.add.failureTitle": {
"message": "Falha no envio!",
"description": "Toast title shown after a server submission fails"
},
"servers.add.errorMessage": {
"message": "Ocorreu um erro ao enviar o servidor",
"description": "Toast message shown after an unexpected server submission error"
},
"servers.add.errorTitle": {
"message": "Erro",
"description": "Generic toast error title"
},
"servers.add.addressPlaceholder": {
"message": "IP/Domínio",
"description": "Add server address input placeholder"
},
"servers.add.submit": {
"message": "Adicionar",
"description": "Add server submit button"
},
"servers.add.openModal": {
"message": "Adicionar servidor",
"description": "Button that opens the add server modal"
},
"servers.filter.showEmpty": {
"message": "Mostrar servidores vazios",
"description": "Checkbox label to show empty servers"
},
"servers.filter.showOmpOnly": {
"message": "Mostrar apenas servidores open.mp",
"description": "Checkbox label to show only open.mp servers"
},
"servers.filter.showPartnersOnly": {
"message": "Mostrar apenas parceiros",
"description": "Checkbox label to show only partner servers"
},
"servers.add.modalTitle": {
"message": "Adicionar um servidor",
"description": "Add server modal title"
},
"servers.add.closeModal": {
"message": "Fechar modal de adicionar servidor",
"description": "Accessible label for closing the add server modal"
},
"servers.add.addressLabel": {
"message": "IP ou domínio",
"description": "Add server address field label"
},
"servers.add.addressHelp": {
"message": "O IP deve estar no formato {format}",
"description": "Help text explaining the required server address format"
},
"servers.add.close": {
"message": "Fechar",
"description": "Close modal button"
},
"servers.page.title": {
"message": "Servidores",
"description": "Servers page title"
},
"servers.page.description": {
"message": "Lista de servidores San Andreas usando open.mp e SA-MP",
"description": "Servers page description"
},
"partners.page.title": {
"message": "Servidores parceiros",
"description": "Partner servers page title"
},
"partners.page.description": {
"message": "Lista de servidores San Andreas usando open.mp ou SA-MP",
"description": "Partner servers page description"
},
"downloads.launcher.layoutDescription": {
"message": "Baixe releases do launcher open.mp",
"description": "Launcher downloads page meta description"
},
"downloads.server.layoutDescription": {
"message": "Baixe releases do servidor open.mp",
"description": "Server downloads page meta description"
},
"downloads.release.githubTitle": {
"message": "Ver release no GitHub",
"description": "Title attribute for the GitHub release link"
},
"animations.layoutTitle": {
"message": "Animações",
"description": "Animations page browser title"
},
"animations.layoutDescription": {
"message": "Visualizador interativo de animações do open.mp (SA-MP) com prévias em vídeo",
"description": "Animations page meta description"
},
"animations.videoUnavailable": {
"message": "Vídeo indisponível",
"description": "Fallback message when an animation video fails to load"
},
"animations.code.forPlayers": {
"message": "// Para jogadores",
"description": "Comment in animation usage example for player animations"
},
"animations.code.forActors": {
"message": "// Para atores",
"description": "Comment in animation usage example for actor animations"
},
"homepage.social.discord": {
"message": "Ícone do Discord",
"description": "Accessible label and image alt text for homepage social link"
},
"homepage.social.facebook": {
"message": "Ícone do Facebook",
"description": "Accessible label and image alt text for homepage social link"
},
"homepage.social.instagram": {
"message": "Ícone do Instagram",
"description": "Accessible label and image alt text for homepage social link"
},
"homepage.social.twitch": {
"message": "Ícone da Twitch",
"description": "Accessible label and image alt text for homepage social link"
},
"homepage.social.x": {
"message": "Ícone do X (antigo Twitter)",
"description": "Accessible label and image alt text for homepage social link"
},
"homepage.social.youtube": {
"message": "Ícone do YouTube",
"description": "Accessible label and image alt text for homepage social link"
},
"announcement.dismissAria": {
"message": "Dispensar anúncio",
"description": "Accessible label for dismissing the homepage announcement"
},
"homepage.downloadLauncherTitle": {
"message": "Baixar o launcher open.mp",
"description": "Title attribute for the launcher download button"
},
"homepage.downloadServerTitle": {
"message": "open.mp foi lançado!",
"description": "Title attribute for the server download button"
},
"homepage.layoutDescription": {
"message": "Um mod multiplayer para Grand Theft Auto: San Andreas totalmente retrocompatível com San Andreas Multiplayer",
"description": "Homepage meta description"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
slug: timers
title: Módulo de timers
authors: y_less
---

Esta prévia mostra melhorias no módulo de timers no open.mp, introduzindo uma API mais flexível e eficiente, mantendo a compatibilidade retroativa.

<!-- truncate -->

:::warning

O conteúdo da publicação abaixo está desatualizado e não reflete o estado atual do open.mp. A publicação está disponível aqui para fins de arquivamento.

:::

Esta é uma prévia de um dos módulos melhorados que fizemos, para timers no open.mp:

```c
native SetTimer(const func[], msInterval, bool:repeat) = SetTimerEx;
native SetTimerEx(const func[], msInterval, bool:repeat, const params[], GLOBAL_TAG_TYPES:...);
native KillTimer(timer) = Timer_Kill;

// CreateTimer
native Timer:Timer_Create(const func[], usDelay, usInterval, repeatCount, const params[] = "", GLOBAL_TAG_TYPES:...);

// KillTimer
native bool:Timer_Kill(Timer:timer);

// Retorna o tempo até a próxima chamada.
native Timer_GetTimeRemaining(Timer:timer);

// Obtém o número de chamadas restantes a fazer (0 para ilimitado).
native Timer_GetCallsRemaining(Timer:timer);

// Obtém o parâmetro `repeatCount`.
native Timer_GetTotalCalls(Timer:timer);

// Obtém o parâmetro `usInterval`.
native Timer_GetInterval(Timer:timer);

// Redefine o tempo restante até a próxima chamada para `usInterval`.
native bool:Timer_Restart(Timer:timer);
```

Os dois primeiros existem apenas para compatibilidade retroativa; o restante é a API melhorada:

```c
native Timer:Timer_Create(const func[], usDelay, usInterval, repeatCount, const params[] = "", GLOBAL_TAG_TYPES:...);
```

- `func` - Bem óbvio: o que chamar.
- `usDelay` - Também óbvio: o atraso antes da chamada (em microssegundos).
- `usInterval` - Para qual valor redefinir `usDelay` depois da primeira chamada. Então, se você quisesse um timer a cada hora cheia, mas agora fossem 8:47 da manhã, a chamada seria `Timer_Create("OnTheHour", 780 SECONDS, 3600 SECONDS, 0);`
- `repeatCount` - Diferente das funções antigas, que eram apenas "uma vez" ou "para sempre", isto recebe o número de vezes que a função deve ser chamada. "Uma vez" seria `1`, `500` pararia após 500 chamadas e (ao contrário da API antiga) `0` significa "para sempre".
- `GLOBAL_TAG_TYPES` - Como `{Float, ...}`, mas com mais tags.
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
slug: turfs-formerly-gangzones-module
title: Módulo de Turfs (anteriormente gangzones)
authors: j0sh
---

Olá! Acabei de terminar nossa implementação de Turf no servidor e pensei em publicar uma visão geral deste módulo e mostrar que não desistimos nem nada do tipo!

<!-- truncate -->

:::warning

O conteúdo da publicação abaixo está desatualizado e não reflete o estado atual do open.mp. A publicação está disponível aqui para fins de arquivamento.

:::

```c
// Cria um Turf. Um playerid pode ser passado para torná-lo um turf de jogador.
native Turf:Turf_Create(Float:minx, Float:miny, Float:maxx, Float:maxy, Player:owner = INVALID_PLAYER_ID);

// Destrói um turf.
native Turf_Destroy(Turf:turf);

// Mostra um Turf para um jogador ou jogadores.
// Será enviado para todos os jogadores se playerid = INVALID_PLAYER_ID.
native Turf_Show(Turf:turf, colour, Player:playerid = INVALID_PLAYER_ID);

// Oculta um Turf de um jogador ou jogadores.
// Será enviado para todos os jogadores se playerid = INVALID_PLAYER_ID.
native Turf_Hide(Turf:turf, Player:playerid = INVALID_PLAYER_ID);

// Faz um Turf piscar para um jogador ou jogadores.
// Será enviado para todos os jogadores se playerid = INVALID_PLAYER_ID.
native Turf_Flash(Turf:turf, colour, Player:playerid = INVALID_PLAYER_ID);

// Para o piscar de um Turf para jogador(es).
// Será enviado para todos os jogadores se playerid = INVALID_PLAYER_ID.
native Turf_StopFlashing(Turf:turf, Player:playerid = INVALID_PLAYER_ID);
```

Isso é obviamente diferente da API tradicional, mas não se preocupe: haverá wrappers para esse tipo de coisa, garantindo que um script normal possa ser recompilado sem problemas e sem edições.

Outro fato importante que talvez você queira saber é que todos os turfs ficam no mesmo pool, e há um máximo de 4.294.967.295 turfs que podem ser criados pelo script. No entanto, o cliente só consegue lidar com 1024 turfs ao mesmo tempo.
Loading