Skip to content

Commit 701fd5b

Browse files
authored
Improvements, fixes and pt-BR docs (#1252)
* Update links to OnVehicleDamageStatusUpdate in EnableTirePopping documentation * Refactor WarningVersion component to use translation for version warning messages * Add version warning messages for new API features in pt-BR translation * Update version warning messages in Portuguese documentation for various callbacks and functions * Add UID generator translations and update component to use localized strings * Add new Portuguese translations for server management and social media links * Update authors list in launcher false positive documentation * add multiple blog posts in Portuguese * Update Portuguese translations and fix callback references in documentation * Update authors list in launcher false positive documentation * Add translation support for various components and pages
1 parent 8ff5093 commit 701fd5b

66 files changed

Lines changed: 3182 additions & 126 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

frontend/blog/2025-02-12-launcher-false-positive.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
slug: launcher-false-positive
33
title: Windows Defender False Positive on Launcher
4-
authors: itsneufox
4+
authors: [iamir, itsneufox]
55
---
66

77
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.

frontend/docs/scripting/functions/EnableTirePopping.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public OnGameModeInit()
3434

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

3939
:::
4040

frontend/i18n/bs/docusaurus-plugin-content-docs/current/scripting/functions/EnableTirePopping.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public OnGameModeInit()
3232

3333
:::warning
3434

35-
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).
35+
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).
3636

3737
:::
3838

frontend/i18n/fa/docusaurus-plugin-content-docs/current/scripting/functions/EnableTirePopping.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public OnGameModeInit()
3434

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

3939
:::
4040

frontend/i18n/pt-BR/code.json

Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,5 +381,217 @@
381381
},
382382
"navbar.item.Donate": {
383383
"message": "Doar"
384+
},
385+
"versionWarn.name.function": {
386+
"message": "função",
387+
"description": "Default item name in a version warning"
388+
},
389+
"versionWarn.name.callback": {
390+
"message": "callback",
391+
"description": "Callback item name in a version warning"
392+
},
393+
"versionWarn.message": {
394+
"message": "Esta {name} foi adicionada no {version} e não funcionará em versões anteriores!",
395+
"description": "Warning shown on scripting docs pages for APIs added in a specific server version"
396+
},
397+
"uid.page.title": {
398+
"message": "Gerador de UID",
399+
"description": "UID generator page title"
400+
},
401+
"uid.page.description": {
402+
"message": "Gere UIDs para usar como identificadores únicos de IComponent ou IExtension",
403+
"description": "UID generator page description"
404+
},
405+
"uid.heading": {
406+
"message": "Gerador de UID de componente",
407+
"description": "UID generator page heading"
408+
},
409+
"uid.instructions.intro": {
410+
"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.",
411+
"description": "UID generator instructions explaining how to use the generated macro"
412+
},
413+
"uid.instructions.findPlaceholder": {
414+
"message": "Encontre este placeholder:",
415+
"description": "UID generator instruction before the placeholder macro"
416+
},
417+
"uid.instructions.replaceWith": {
418+
"message": "E substitua por:",
419+
"description": "UID generator instruction before the generated replacement macro"
420+
},
421+
"uid.instructions.existingComponent": {
422+
"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.",
423+
"description": "UID generator note for modifying an existing component"
424+
},
425+
"lowercaseNote.name.function": {
426+
"message": "função",
427+
"description": "Default item name in a lowercase-name warning"
428+
},
429+
"lowercaseNote.message": {
430+
"message": "Esta {name} começa com uma letra minúscula.",
431+
"description": "Warning shown on scripting docs pages for APIs whose names start with lowercase letters"
432+
},
433+
"npcCallbacksTip.message": {
434+
"message": "Esta callback também pode ser chamada por NPC.",
435+
"description": "Tip shown on callback docs pages when NPCs can also call the callback"
436+
},
437+
"toast.close": {
438+
"message": "Fechar notificação",
439+
"description": "Accessible label for closing a toast notification"
440+
},
441+
"servers.add.successMessage": {
442+
"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!",
443+
"description": "Toast message shown after submitting a server to the pending list"
444+
},
445+
"servers.add.successTitle": {
446+
"message": "Servidor enviado!",
447+
"description": "Toast title shown after a server submission succeeds"
448+
},
449+
"servers.add.failureMessage": {
450+
"message": "Status {status}: {error}",
451+
"description": "Toast message shown after a server submission fails"
452+
},
453+
"servers.add.failureTitle": {
454+
"message": "Falha no envio!",
455+
"description": "Toast title shown after a server submission fails"
456+
},
457+
"servers.add.errorMessage": {
458+
"message": "Ocorreu um erro ao enviar o servidor",
459+
"description": "Toast message shown after an unexpected server submission error"
460+
},
461+
"servers.add.errorTitle": {
462+
"message": "Erro",
463+
"description": "Generic toast error title"
464+
},
465+
"servers.add.addressPlaceholder": {
466+
"message": "IP/Domínio",
467+
"description": "Add server address input placeholder"
468+
},
469+
"servers.add.submit": {
470+
"message": "Adicionar",
471+
"description": "Add server submit button"
472+
},
473+
"servers.add.openModal": {
474+
"message": "Adicionar servidor",
475+
"description": "Button that opens the add server modal"
476+
},
477+
"servers.filter.showEmpty": {
478+
"message": "Mostrar servidores vazios",
479+
"description": "Checkbox label to show empty servers"
480+
},
481+
"servers.filter.showOmpOnly": {
482+
"message": "Mostrar apenas servidores open.mp",
483+
"description": "Checkbox label to show only open.mp servers"
484+
},
485+
"servers.filter.showPartnersOnly": {
486+
"message": "Mostrar apenas parceiros",
487+
"description": "Checkbox label to show only partner servers"
488+
},
489+
"servers.add.modalTitle": {
490+
"message": "Adicionar um servidor",
491+
"description": "Add server modal title"
492+
},
493+
"servers.add.closeModal": {
494+
"message": "Fechar modal de adicionar servidor",
495+
"description": "Accessible label for closing the add server modal"
496+
},
497+
"servers.add.addressLabel": {
498+
"message": "IP ou domínio",
499+
"description": "Add server address field label"
500+
},
501+
"servers.add.addressHelp": {
502+
"message": "O IP deve estar no formato {format}",
503+
"description": "Help text explaining the required server address format"
504+
},
505+
"servers.add.close": {
506+
"message": "Fechar",
507+
"description": "Close modal button"
508+
},
509+
"servers.page.title": {
510+
"message": "Servidores",
511+
"description": "Servers page title"
512+
},
513+
"servers.page.description": {
514+
"message": "Lista de servidores San Andreas usando open.mp e SA-MP",
515+
"description": "Servers page description"
516+
},
517+
"partners.page.title": {
518+
"message": "Servidores parceiros",
519+
"description": "Partner servers page title"
520+
},
521+
"partners.page.description": {
522+
"message": "Lista de servidores San Andreas usando open.mp ou SA-MP",
523+
"description": "Partner servers page description"
524+
},
525+
"downloads.launcher.layoutDescription": {
526+
"message": "Baixe releases do launcher open.mp",
527+
"description": "Launcher downloads page meta description"
528+
},
529+
"downloads.server.layoutDescription": {
530+
"message": "Baixe releases do servidor open.mp",
531+
"description": "Server downloads page meta description"
532+
},
533+
"downloads.release.githubTitle": {
534+
"message": "Ver release no GitHub",
535+
"description": "Title attribute for the GitHub release link"
536+
},
537+
"animations.layoutTitle": {
538+
"message": "Animações",
539+
"description": "Animations page browser title"
540+
},
541+
"animations.layoutDescription": {
542+
"message": "Visualizador interativo de animações do open.mp (SA-MP) com prévias em vídeo",
543+
"description": "Animations page meta description"
544+
},
545+
"animations.videoUnavailable": {
546+
"message": "Vídeo indisponível",
547+
"description": "Fallback message when an animation video fails to load"
548+
},
549+
"animations.code.forPlayers": {
550+
"message": "// Para jogadores",
551+
"description": "Comment in animation usage example for player animations"
552+
},
553+
"animations.code.forActors": {
554+
"message": "// Para atores",
555+
"description": "Comment in animation usage example for actor animations"
556+
},
557+
"homepage.social.discord": {
558+
"message": "Ícone do Discord",
559+
"description": "Accessible label and image alt text for homepage social link"
560+
},
561+
"homepage.social.facebook": {
562+
"message": "Ícone do Facebook",
563+
"description": "Accessible label and image alt text for homepage social link"
564+
},
565+
"homepage.social.instagram": {
566+
"message": "Ícone do Instagram",
567+
"description": "Accessible label and image alt text for homepage social link"
568+
},
569+
"homepage.social.twitch": {
570+
"message": "Ícone da Twitch",
571+
"description": "Accessible label and image alt text for homepage social link"
572+
},
573+
"homepage.social.x": {
574+
"message": "Ícone do X (antigo Twitter)",
575+
"description": "Accessible label and image alt text for homepage social link"
576+
},
577+
"homepage.social.youtube": {
578+
"message": "Ícone do YouTube",
579+
"description": "Accessible label and image alt text for homepage social link"
580+
},
581+
"announcement.dismissAria": {
582+
"message": "Dispensar anúncio",
583+
"description": "Accessible label for dismissing the homepage announcement"
584+
},
585+
"homepage.downloadLauncherTitle": {
586+
"message": "Baixar o launcher open.mp",
587+
"description": "Title attribute for the launcher download button"
588+
},
589+
"homepage.downloadServerTitle": {
590+
"message": "open.mp foi lançado!",
591+
"description": "Title attribute for the server download button"
592+
},
593+
"homepage.layoutDescription": {
594+
"message": "Um mod multiplayer para Grand Theft Auto: San Andreas totalmente retrocompatível com San Andreas Multiplayer",
595+
"description": "Homepage meta description"
384596
}
385597
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
slug: timers
3+
title: Módulo de timers
4+
authors: y_less
5+
---
6+
7+
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.
8+
9+
<!-- truncate -->
10+
11+
:::warning
12+
13+
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.
14+
15+
:::
16+
17+
Esta é uma prévia de um dos módulos melhorados que fizemos, para timers no open.mp:
18+
19+
```c
20+
native SetTimer(const func[], msInterval, bool:repeat) = SetTimerEx;
21+
native SetTimerEx(const func[], msInterval, bool:repeat, const params[], GLOBAL_TAG_TYPES:...);
22+
native KillTimer(timer) = Timer_Kill;
23+
24+
// CreateTimer
25+
native Timer:Timer_Create(const func[], usDelay, usInterval, repeatCount, const params[] = "", GLOBAL_TAG_TYPES:...);
26+
27+
// KillTimer
28+
native bool:Timer_Kill(Timer:timer);
29+
30+
// Retorna o tempo até a próxima chamada.
31+
native Timer_GetTimeRemaining(Timer:timer);
32+
33+
// Obtém o número de chamadas restantes a fazer (0 para ilimitado).
34+
native Timer_GetCallsRemaining(Timer:timer);
35+
36+
// Obtém o parâmetro `repeatCount`.
37+
native Timer_GetTotalCalls(Timer:timer);
38+
39+
// Obtém o parâmetro `usInterval`.
40+
native Timer_GetInterval(Timer:timer);
41+
42+
// Redefine o tempo restante até a próxima chamada para `usInterval`.
43+
native bool:Timer_Restart(Timer:timer);
44+
```
45+
46+
Os dois primeiros existem apenas para compatibilidade retroativa; o restante é a API melhorada:
47+
48+
```c
49+
native Timer:Timer_Create(const func[], usDelay, usInterval, repeatCount, const params[] = "", GLOBAL_TAG_TYPES:...);
50+
```
51+
52+
- `func` - Bem óbvio: o que chamar.
53+
- `usDelay` - Também óbvio: o atraso antes da chamada (em microssegundos).
54+
- `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);`
55+
- `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".
56+
- `GLOBAL_TAG_TYPES` - Como `{Float, ...}`, mas com mais tags.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
slug: turfs-formerly-gangzones-module
3+
title: Módulo de Turfs (anteriormente gangzones)
4+
authors: j0sh
5+
---
6+
7+
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!
8+
9+
<!-- truncate -->
10+
11+
:::warning
12+
13+
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.
14+
15+
:::
16+
17+
```c
18+
// Cria um Turf. Um playerid pode ser passado para torná-lo um turf de jogador.
19+
native Turf:Turf_Create(Float:minx, Float:miny, Float:maxx, Float:maxy, Player:owner = INVALID_PLAYER_ID);
20+
21+
// Destrói um turf.
22+
native Turf_Destroy(Turf:turf);
23+
24+
// Mostra um Turf para um jogador ou jogadores.
25+
// Será enviado para todos os jogadores se playerid = INVALID_PLAYER_ID.
26+
native Turf_Show(Turf:turf, colour, Player:playerid = INVALID_PLAYER_ID);
27+
28+
// Oculta um Turf de um jogador ou jogadores.
29+
// Será enviado para todos os jogadores se playerid = INVALID_PLAYER_ID.
30+
native Turf_Hide(Turf:turf, Player:playerid = INVALID_PLAYER_ID);
31+
32+
// Faz um Turf piscar para um jogador ou jogadores.
33+
// Será enviado para todos os jogadores se playerid = INVALID_PLAYER_ID.
34+
native Turf_Flash(Turf:turf, colour, Player:playerid = INVALID_PLAYER_ID);
35+
36+
// Para o piscar de um Turf para jogador(es).
37+
// Será enviado para todos os jogadores se playerid = INVALID_PLAYER_ID.
38+
native Turf_StopFlashing(Turf:turf, Player:playerid = INVALID_PLAYER_ID);
39+
```
40+
41+
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.
42+
43+
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.

0 commit comments

Comments
 (0)