Skip to content
Open
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/docs/client/CrashAddresses.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The below table lists some common crash addresses which you can use to help trac
| --------- | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Rare | 0x00000000 | SA:MP is not initializing. | Re-install the game, ensure singleplayer works If you have any mods installed, remove them |
| Rare | 0x006E3D17 | Skin related. Often occurs when changing the skin of a player who is in a vehicle, or is just entering or exiting one. | Ensure the player is on foot prior to changing their skin. |
| Rare | 0x0058370A | Hard to trace. Appears to be vehicle / camera related. Occured when the script attempted to put the player in a vehicle. The vehicle the player is being teleported into is not yet available and/or rendered in the world | Wait a few hundred-ms before teleporting a player into a vehicle that is newly created. Another solution would potentially be to use SetCameraBehindPlayer prior to teleporting them to the vehicle. |
| Rare | 0x0058370A | Hard to trace. Appears to be vehicle / camera related. Occurred when the script attempted to put the player in a vehicle. The vehicle the player is being teleported into is not yet available and/or rendered in the world | Wait a few hundred-ms before teleporting a player into a vehicle that is newly created. Another solution would potentially be to use SetCameraBehindPlayer prior to teleporting them to the vehicle. |
| Rare | 0x0040F64C | Issue in Windows 7 / Vista relating to permissions. Problem in the installer version that the SA:MP client uses | Update to SA:MP 0.3.7. If it still occurs rename your GTASA directory. |
| Rare | 0x0059F8B4 | Occurs when the client fails to load SA:MP objects. Usually a problem with one an essential file, samp.img being missing. | Re-install the client. Try running the installer as Administrator if using Windows Vista / 7. |
| Rare | 0x00746929 OR 0x0081214A | Badly configured client side setting. | Terminate your "gta_sa.exe" using Task Manager |
Expand Down
2 changes: 1 addition & 1 deletion frontend/docs/scripting/functions/GetPlayerAmmo.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The amount of ammo in the player's current weapon.
## Examples

```c
ublic OnPlayerCommandText(playerid, cmdtext[])
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp(cmdtext, "/myammo", true))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public OnPlayerCommandText(playerid,cmdtext[])
if (!strcmp(cmdtext, "/msgsent"))
{
new szString[144];
format(szString, sizeof(szString), "You have recieved %i network messages.", NetStats_MessagesSent(playerid));
format(szString, sizeof(szString), "You have received %i network messages.", NetStats_MessagesSent(playerid));
SendClientMessage(playerid, -1, szString);
}
return 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public OnPlayerSpawn(playerid)

:::note

Only one object may be attached per player. This function is seperate from the CreateObject / CreatePlayerObject pools.
Only one object may be attached per player. This function is separate from the CreateObject / CreatePlayerObject pools.

:::

Expand Down
2 changes: 1 addition & 1 deletion frontend/docs/scripting/language/Directives.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ new
main() {printf("%d", gOldVariable);}
```

That will give a warning that gOldVariable should not be used anymore. This is mostly useful for functions to preserve backwards compatability while updating the API.
That will give a warning that gOldVariable should not be used anymore. This is mostly useful for functions to preserve backwards compatibility while updating the API.

### `#tryinclude`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ argument list (see page 80).
| Returns | value if it is in the range min – max; min if value is lower than min; and max if value is higher than max. | |
| See also | max, min | |

| funcidx | | Return a public funtion index |
| funcidx | | Return a public function index |
| ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------: |
| Syntax | funcidx(const name[]) | |
| Returns | The index of the named public function. If no public function with the given name exists, funcidx returns −1. | |
Expand Down
2 changes: 1 addition & 1 deletion frontend/docs/tutorials/AdvancedStructures.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ Adding a value to a binary tree is relatively easy, you just follow the tree thr

Deleting a number from a binary tree can be hard or it can be easy. If the number is at the end of a branch (e.g. 1, 5, 7, 12 etc in the original tree) you simply remove them. If a number only has one child (e.g. the 9 in the second example) you simply move that child (e.g. the 12) up into their position (so 6's children would be 2 and 12 in the new second example with 9 removed). Deletion only gets interesting when a node has two children. There are at least four ways of doing this:

The first method is the simplest computationally. Basically you choose one of the branches (left or right, assume right for this explanation) and replace the node you've removed with the first node of that branch (i.e. the right child of the node you've removed). You then go left through the new branch till you reach the end and place the left branch there. E.g. if you removed the 14 from the original exampe you would end up with 25 taking its place at the top of the tree and 6 attached to the left branch of 17. This method is fast but ends up with very unbalanced trees very quickly.
The first method is the simplest computationally. Basically you choose one of the branches (left or right, assume right for this explanation) and replace the node you've removed with the first node of that branch (i.e. the right child of the node you've removed). You then go left through the new branch till you reach the end and place the left branch there. E.g. if you removed the 14 from the original example you would end up with 25 taking its place at the top of the tree and 6 attached to the left branch of 17. This method is fast but ends up with very unbalanced trees very quickly.

The second method is to get all the numbers which are children of the node you just removed and rebuild a new binary tree from them, then put the top of that tree into the node you've just removed. This keeps the tree fairly well balanced but is obviously slower.

Expand Down
8 changes: 4 additions & 4 deletions frontend/docs/tutorials/MenuGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ Now a bit of an explanation about the [CreateMenu](../scripting/functions/Create
| Parameter | Specifies |
| --------------- | ---------------------------------------------------------------- |
| title | The heading of the menu |
| columns | The number here defines how much columns are used (2 is maximum) |
| Float:x | The heigth position of the menu on screen (left to right) |
| Float:y | The width position of the menu on screen (up and down) |
| columns | The number here defines how many columns are used (2 is maximum) |
| Float:x | The horizontal position of the menu on screen (left to right) |
| Float:y | The vertical position of the menu on screen (up and down) |
| Float:col1width | The width of the first column |
| Float:col2width | The width of the second column |

Expand Down Expand Up @@ -152,6 +152,6 @@ Really easy, wasn't it?

Okay, after you read this AND understood it, try your own menu. As you could see, it isn't that difficult, but will impress the players on your server all the more. And you can script really cool effects with this. It's also very cool for general stores or supermarkets for the things you can buy. Then you can subtract some money as effect and the price is shown in another column in the menu. But now, work on your own.

You can also add [TogglePlayerControllable](../scripting/functions/TogglePlayerControllable) with `false` after `ShowPlayerMenu` and [TogglePlayerControllable](../scripting/functions/TogglePlayerControllable) with `true` at end of `OnPlayerSelectedMenuRow` so that player may not move while they are browsing menus.
You can also add [TogglePlayerControllable](../scripting/functions/TogglePlayerControllable) with `false` after `ShowMenuForPlayer` and [TogglePlayerControllable](../scripting/functions/TogglePlayerControllable) with `true` at end of `OnPlayerSelectedMenuRow` so that player may not move while they are browsing menus.

I hope you learned something from this tutorial. If you have any questions, ask in the forums/discord.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public OnPlayerCommandText(playerid, cmdtext[])
return 0;
// Devolviendo 0 informa al servidor que el comando no fue procesado por este script.
// OnPlayerCommandText va a ser llamado en otros scripts hasta que uno devuelva 1.
// Si ningún script devuelve 1, el mensaje 'SERVER: Unkown Command' va a ser mostrado al jugador.
// Si ningún script devuelve 1, el mensaje 'SERVER: Unknown Command' va a ser mostrado al jugador.
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public OnPlayerCommandText(playerid,cmdtext[])
if (!strcmp(cmdtext, "/msgsent"))
{
new szString[144];
format(szString, sizeof(szString), "You have recieved %i network messages.", NetStats_MessagesSent(playerid));
format(szString, sizeof(szString), "You have received %i network messages.", NetStats_MessagesSent(playerid));
SendClientMessage(playerid, -1, szString);
}
return 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,6 @@ if(strcmp(cmdtext, "/teleport", true) == 0)

خوب، بعد از اینکه این را خواندید و متوجه شدید، منوی خودتان را امتحان کنید. همان طور که دیدید، خیلی دشوار نیست، اما بازیکنان سرور شما را بیشتر تحت تأثیر قرار خواهد داد. و می‌توانید افکت‌های واقعاً جالبی با این اسکریپت کنید. همچنین برای فروشگاه‌های عمومی یا سوپرمارکت‌ها برای چیزهایی که می‌توانید بخرید بسیار جالب است. سپس می‌توانید مقداری پول کم کنید و قیمت در ستون دیگر منو نشان داده شود. اما حالا، روی کار خودتان کار کنید.

همچنین می‌توانید [TogglePlayerControllable](../scripting/functions/TogglePlayerControllable) با `false` بعد از `ShowPlayerMenu` و [TogglePlayerControllable](../scripting/functions/TogglePlayerControllable) با `true` در انتهای `OnPlayerSelectedMenuRow` اضافه کنید تا بازیکن نتواند حرکت کند وقتی منوها را می‌بیند.
همچنین می‌توانید [TogglePlayerControllable](../scripting/functions/TogglePlayerControllable) با `false` بعد از `ShowMenuForPlayer` و [TogglePlayerControllable](../scripting/functions/TogglePlayerControllable) با `true` در انتهای `OnPlayerSelectedMenuRow` اضافه کنید تا بازیکن نتواند حرکت کند وقتی منوها را می‌بیند.

امیدوارم از این آموزش چیزی یاد گرفته باشید. اگر سؤالی دارید، در انجمن‌ها/دیسکورد بپرسید.
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,6 @@ Sangat mudah, bukan?

Oke, setelah kalian membaca ini dan memahaminya, cobalah untuk membuat menu kalian sendiri. Seperti yang kalian lihat, ini tidaklah sulit, tapi ini akan membuat pemain di dalam server kamu sangat terkesan. Dan kalian dapat membuatnya lebih keren daripada ini. Ini sangatlah berguna bagi general store dan supermarket untuk membeli sesuatu. Lalu kalian dapat mengurangi uang sebagai efek dan harga yang ditampilkan di kolom lain pada menu. Tapi sekarang, buatlah sesuai kebutuhan kalian.

Kalian dapat menambahkan [TogglePlayerControllable](../scripting/functions/TogglePlayerControllable) dengan `false` setelah `ShowPlayerMenu` dan [TogglePlayerControllable](../scripting/functions/TogglePlayerControllable) dengan `true` pada akhir `OnPlayerSelectedMenuRow`, jadi pemain tidak dapat berpindah ketika memilih sesuatu di dalam menu.
Kalian dapat menambahkan [TogglePlayerControllable](../scripting/functions/TogglePlayerControllable) dengan `false` setelah `ShowMenuForPlayer` dan [TogglePlayerControllable](../scripting/functions/TogglePlayerControllable) dengan `true` pada akhir `OnPlayerSelectedMenuRow`, jadi pemain tidak dapat berpindah ketika memilih sesuatu di dalam menu.

Saya harap kalian dapat mempelajari sesuatu dari tutorial ini. Jika kamu memiliki pertanyaan, silahkan bertanya di forum/discord.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ A quantidade de munição na arma atual do jogador.
## Exemplos

```c
ublic OnPlayerCommandText(playerid, cmdtext[])
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp(cmdtext, "/myammo", true))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public OnPlayerCommandText(playerid,cmdtext[])
if (!strcmp(cmdtext, "/msgsent"))
{
new szString[144];
format(szString, sizeof(szString), "You have recieved %i network messages.", NetStats_MessagesSent(playerid));
format(szString, sizeof(szString), "You have received %i network messages.", NetStats_MessagesSent(playerid));
SendClientMessage(playerid, -1, szString);
}
return 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1302,7 +1302,7 @@ entry() <mirt_override>

---

If a pedestrian pushes the button during mirt activity, that button press is forgotten. Unless emergencies are a frequent occurence, this is probably a minor nuisance; and it is easy to fix, too.
If a pedestrian pushes the button during mirt activity, that button press is forgotten. Unless emergencies are a frequent occurrence, this is probably a minor nuisance; and it is easy to fix, too.

### • State programming wrap-up

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,6 @@ Muito fácil, não foi?

Ok, depois de ler isso E entender, tente seu próprio menu. Como você pôde ver, não é tão difícil, mas vai impressionar os jogadores do seu servidor ainda mais. E você pode programar efeitos muito legais com isso. Também é muito legal para lojas gerais ou supermercados para as coisas que você pode comprar. Então você pode subtrair algum dinheiro como efeito e o preço é mostrado em outra coluna no menu. Mas agora, trabalhe no seu próprio.

Você também pode adicionar [TogglePlayerControllable](../scripting/functions/TogglePlayerControllable) com `false` após `ShowPlayerMenu` e [TogglePlayerControllable](../scripting/functions/TogglePlayerControllable) com `true` no final de `OnPlayerSelectedMenuRow` para que o jogador não possa se mover enquanto estiver navegando nos menus.
Você também pode adicionar [TogglePlayerControllable](../scripting/functions/TogglePlayerControllable) com `false` após `ShowMenuForPlayer` e [TogglePlayerControllable](../scripting/functions/TogglePlayerControllable) com `true` no final de `OnPlayerSelectedMenuRow` para que o jogador não possa se mover enquanto estiver navegando nos menus.

Espero que você tenha aprendido algo com este tutorial. Se tiver alguma dúvida, pergunte nos fóruns/discord.
Loading
Loading