text stringlengths 1 2.83M | id stringlengths 16 152 | metadata dict | __index_level_0__ int64 0 949 |
|---|---|---|---|
---
title: Attach3DTextLabelToVehicle
description: Naglalagay ng 3D Text Label sa isang partikular na sasakyan.
tags: ["vehicle", "3dtextlabel"]
---
## Description
Naglalagay ng 3D Text Label sa isang partikular na sasakyan.
| Name | Description |
| --------- | ---------------------------------------------------------------------------- |
| Text3D:textid | Ang 3D Text Label na gusto mong ilagay. |
| vehicleid | Ang sasakyan kung saan mo gustong ilagay ang 3D Text Label. |
| OffsetX | Ang Offset-X coordinate ng player na sasakyan (ang sasakyan ay 0.0,0.0,0.0)..|
| OffsetY | Ang Offset-Y coordinate ng player na sasakyan (ang sasakyan ay 0.0,0.0,0.0)..|
| OffsetZ | Ang Offset-Z coordinate ng player na sasakyan (ang sasakyan ay 0.0,0.0,0.0)..|
## Returns
Ang function na ito ay hindi nagbabalik ng anumang value.
## Examples
```c
new
Text3D:gVehicle3dText[MAX_VEHICLES], // Pag gawa ng para sa paggamit mamaya
gVehicleId;
public OnGameModeInit ( )
{
gVehicleId = CreateVehicle(510, 0.0, 0.0, 15.0, 5, 0, 120); // Paggawa ng Sasakyan.
gVehicle3dText[gVehicleId] = Create3DTextLabel("Example Text", 0xFF0000AA, 0.0, 0.0, 0.0, 50.0, 0, 1);
Attach3DTextLabelToVehicle(gVehicle3dText[gVehicleId], vehicle_id, 0.0, 0.0, 2.0); // Paglalagay ng Text Label sa Sasakyan.
}
public OnGameModeExit ( )
{
Delete3DTextLabel(gVehicle3dText[gVehicleId]);
return true;
}
```
## Related Functions
- [Create3DTextLabel](Create3DTextLabel): Gumawa ng 3D text label.
- [Delete3DTextLabel](Delete3DTextLabel): Magtanggal ng 3D text label.
- [Attach3DTextLabelToPlayer](Attach3DTextLabelToPlayer): Mag-attach ng 3D text label sa isang player.
- [Update3DTextLabelText](Update3DTextLabelText): Baguhin ang text ng isang 3D text label.
- [CreatePlayer3DTextLabel](CreatePlayer3DTextLabel): Gumawa ng 3D text label para sa isang player.
- [DeletePlayer3DTextLabel](DeletePlayer3DTextLabel): Tanggalin ang 3D text label ng player.
- [UpdatePlayer3DTextLabelText](UpdatePlayer3DTextLabelText): Baguhin ang text ng 3D text label ng player. | openmultiplayer/web/docs/translations/fil/scripting/functions/Attach3DTextLabelToVehicle.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/fil/scripting/functions/Attach3DTextLabelToVehicle.md",
"repo_id": "openmultiplayer",
"token_count": 893
} | 383 |
---
title: EnableStuntBonusForPlayer
description: I-toggle ang mga stunt bonus para sa isang player.
tags: ["player"]
---
## Description
I-toggle ang mga stunt bonus para sa isang player. Pinagana bilang default.
| Name | Description |
| -------- | ------------------------------------------------- |
| playerid | Ang ID ng player para i-toggle ang mga stunt bonus. |
| enable | 1 para paganahin ang mga stunt bonus at 0 para i-disable ang mga ito. |
## Returns
1: Matagumpay na naisakatuparan ang function.
0: Nabigo ang function na isagawa. Hindi konektado ang player.
## Examples
```c
public OnPlayerConnect(playerid)
{
EnableStuntBonusForPlayer(playerid, 0); // I-disable ang mga stunt bonus kapag kumonekta ang player sa server.
}
```
## Related Functions
- [EnableStuntBonusForAll](EnableStuntBonusForAll): I-toggle ang mga stunt bonus para sa lahat ng manlalaro. | openmultiplayer/web/docs/translations/fil/scripting/functions/EnableStuntBonusForPlayer.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/fil/scripting/functions/EnableStuntBonusForPlayer.md",
"repo_id": "openmultiplayer",
"token_count": 316
} | 384 |
---
title: IsPlayerNPC
description: Suriin kung ang isang player ay isang aktwal na player o isang NPC.
tags: ["player", "npc"]
---
## Description
Suriin kung ang isang player ay isang aktwal na player o isang NPC.
| Name | Description |
| -------- | ------------------------------ |
| playerid | Ang ID ng player na susuriin. |
## Returns
1: Ang player ay isang NPC.
0: Ang player ay hindi isang NPC.
## Examples
```c
public OnPlayerConnect(playerid)
{
if (IsPlayerNPC(playerid))
{
SendClientMessageToAll(-1, "An NPC connected!");
return 1;
}
// Ang ibang code dito ay hindi ma e-execute maliban kung ito ay isang player
}
```
## Related Functions
- [ConnectNPC](ConnectNPC): Ikonekta ang isang NPC.
- [IsPlayerAdmin](IsPlayerAdmin): Sinusuri kung ang isang manlalaro ay naka-log in sa RCON. | openmultiplayer/web/docs/translations/fil/scripting/functions/IsPlayerNPC.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/fil/scripting/functions/IsPlayerNPC.md",
"repo_id": "openmultiplayer",
"token_count": 323
} | 385 |
---
title: SetWeather
description: Itakda ang lagay ng panahon sa mundo para sa lahat ng manlalaro.
tags: []
---
## Description
Itakda ang lagay ng panahon sa mundo para sa lahat ng manlalaro.
| Name | Description |
| --------- | ------------------------------------------------ |
| weatherid | Ang [weather](../resources/weatherid) na itatakda.|
## Returns
Ang function na ito ay hindi nagbabalik ng anumang value.
## Examples
```c
if (!strcmp(cmdtext, "/sandstorm", true))
{
SetWeather(19);
return 1;
}
```
## Notes
:::tip
Kung pinagana ang TogglePlayerClock, dahan-dahang magbabago ang panahon sa paglipas ng panahon, sa halip na agad na magbago. Mayroon lamang valid na 21 weather ID sa laro (0 - 20), gayunpaman ang laro ay walang anumang anyo ng range check.
:::
## Related Functions
- [SetPlayerWeather](SetPlayerWeather): Magtakda ng panahon ng manlalaro.
- [SetGravity](SetGravity): Itakda ang global gravity. | openmultiplayer/web/docs/translations/fil/scripting/functions/SetWeather.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/fil/scripting/functions/SetWeather.md",
"repo_id": "openmultiplayer",
"token_count": 359
} | 386 |
---
title: floatround
description: I-round ang isang floating point number sa isang integer value.
tags: ["math", "floating-point"]
---
<LowercaseNote />
## Description
I-round ang isang floating point number sa isang integer value.
| Name | Description |
| --------------------------------------- | ---------------------------- |
| value | Ang value na i-round |
| [mode](../resources/floatroundmodes) | Ang mga floatround mode na gagamitin. |
## Returns
Ang bilugan na halaga bilang isang integer.
## Examples
```c
floatround(3.3, floatround_ceil);
```
## Related Functions
- [float](float): I-convert ang isang integer sa isang float.
- [floatstr](floatstr): I-convert ang isang string sa isang float. | openmultiplayer/web/docs/translations/fil/scripting/functions/floatround.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/fil/scripting/functions/floatround.md",
"repo_id": "openmultiplayer",
"token_count": 310
} | 387 |
---
title: OnClientCheckResponse
description: Ce rappel est appelé lorsque la demande SendClientCheck est terminée
tags: []
---
## Description
Ce rappel est appelé lorsque la demande SendClientCheck est terminée.
| Nom | Description |
| -------------| --------------------------------- |
| playerid | L'ID du joueur vérifié. |
| actionid | Le type de vérification effectuée.|
| memaddr | L'adresse demandée. |
| retndata | Le résultat de la vérification. |
## Retours
Il est toujours appelé en premier dans les filtrescripts.
## Exemples
```c
public OnPlayerConnect(playerid)
{
SendClientCheck(playerid, 0x48, 0, 0, 2);
return 1;
}
public OnClientCheckResponse(playerid, actionid, memaddr, retndata)
{
if(actionid == 0x48) // ou 72
{
print("AVERTISSEMENT : Le joueur ne semble pas utiliser un ordinateur régulier !");
Kick(playerid);
}
return 1;
}
```
## Remarques
:::warning
**Serveur SA:MP**: Ce rappel est uniquement appelé lorsqu'il est dans un filterscript..
**Serveur Open Multiplayer**: Ce rappel fonctionne normalement dans un gamemode / filterscript.
:::
## Fonctions Relatives
La fonction suivante peut être utile, car elle est liée à ce rappel d'une manière ou d'une autre.
- [SendClientCheck](../functions/SendClientCheck): Effectue une vérification de mémoire sur le client.
| openmultiplayer/web/docs/translations/fr/scripting/Callbacks/OnClientCheckResponse.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/fr/scripting/Callbacks/OnClientCheckResponse.md",
"repo_id": "openmultiplayer",
"token_count": 565
} | 388 |
---
title: OnObjectMoved
description: Cette callback est appelée quand un objet s'est arrêté de bouger après un MoveObject
tags: [OnObjectMoved, SetObjectPos, objectid, object, objet, mouvement, moved, IsObjectMoving, MoveObject]
---
## Paramètres
Cette callback est appelée quand un objet s'est arrêté de bouger après un MoveObject.
| Nom | Description |
| -------------- | ------------------------------------------ |
| `int` objectid | ID de l'objet qui était en mouvement |
## Valeur de retour
Cette callback ne retourne rien, mais doit retourner quelque chose. Autrement dit, `return callback();` ne fonctionnera pas car la callback ne retourne rien, mais un return _(`return 1;` ou `return 0;`)_ doit être effectué dans la callback.
## Exemple
```c
public OnObjectMoved(objectid)
{
printf("L'objet %d a fini son mouvement.", objectid);
return 1;
}
```
## Astuces
:::tip
SetObjectPos ne fonctionne pas dans cette callback. Il faut recréer l'objet pour éviter ce problème.
:::
## Fonctions connexes
- [MoveObject](../functions/MoveObject): Déplace un objet.
- [MovePlayerObject](../functions/MovePlayerObject): Déplace l'objet d'un joueur.
- [IsObjectMoving](../functions/IsObjectMoving): Vérifie si l'objet se déplace.
- [StopObject](../functions/StopObject): Arrête le mouvement d'un objet.
## Callback connexe
- [OnPlayerObjectMoved](OnPlayerObjectMoved): Callback appelée lorsque l'objet d'un joueur arrête de bouger.
| openmultiplayer/web/docs/translations/fr/scripting/Callbacks/OnObjectMoved.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/fr/scripting/Callbacks/OnObjectMoved.md",
"repo_id": "openmultiplayer",
"token_count": 569
} | 389 |
---
title: OnPlayerEnterPlayerGangZone
description: Ce rappel est appelé lorsqu'un joueur entre dans une zone de gang de joueur.
tags: ["player", "gangzone"]
---
<VersionWarn name='callback' version='omp v1.1.0.2612' />
## Description
Ce rappel est appelé lorsqu'un joueur entre dans une zone de gang de joueur.
| Nom | Description |
| --------- | ------------------------------------------------------ |
| playerid | L'ID du joueur qui est entré dans la zone de gang de joueur. |
| zoneid | L'ID de la zone de gang de joueur dans laquelle le joueur est entré. |
## Retours
Il est toujours appelé en premier dans le gamemode.
## Exemples
```c
public OnPlayerEnterPlayerGangZone(playerid, zoneid)
{
new string[128];
format(string, sizeof(string), "Vous entrez dans la zone de gang de joueur %i", zoneid);
SendClientMessage(playerid, 0xFFFFFFFF, string);
return 1;
}
```
## Rappels Relatives
Les rappels suivants peuvent être utiles, car ils sont liés à ce rappel d'une manière ou d'une autre.
- [OnPlayerLeavePlayerGangZone](OnPlayerLeavePlayerGangZone): Ce rappel est appelé lorsqu'un joueur quitte une zone de gang de joueur.
## Fonctions Relatives
Les fonctions suivantes peuvent être utiles, car elles sont liées à ce rappel d'une manière ou d'une autre.
- [CreatePlayerGangZone](../functions/CreatePlayerGangZone): Crée une zone de gang de joueur.
- [PlayerGangZoneDestroy](../functions/PlayerGangZoneDestroy): Détruit une zone de gang de joueur.
- [UsePlayerGangZoneCheck](../functions/UsePlayerGangZoneCheck): Active le rappel lorsque qu'un joueur entre dans cette zone.
| openmultiplayer/web/docs/translations/fr/scripting/Callbacks/OnPlayerEnterPlayerGangZone.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/fr/scripting/Callbacks/OnPlayerEnterPlayerGangZone.md",
"repo_id": "openmultiplayer",
"token_count": 622
} | 390 |
---
title: OnPlayerPickupStreamOut
description: Ce rappel est appelé lorsque qu'un objet joueur-pickup quitte la portée visuelle du joueur.
tags: ["player", "pickup", "playerpickup"]
---
<VersionWarn name='callback' version='omp v1.1.0.2612' />
## Description
Ce rappel est appelé lorsque qu'un objet joueur-pickup quitte la portée visuelle du joueur.
| Nom | Description |
|----------|------------------------------------------------------------------------------------------------|
| pickupid | L'ID de l'objet joueur-pickup, retourné par [CreatePlayerPickup](../functions/CreatePlayerPickup) |
| playerid | L'ID du joueur dont l'objet joueur-pickup quitte la portée visuelle. |
## Retours
Il est toujours appelé en premier dans le gamemode.
## Exemples
```c
new g_PlayerPickupHealth[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
g_PlayerPickupHealth[playerid] = CreatePlayerPickup(playerid, 1240, 2, 2009.8474, 1218.0459, 10.8175);
return 1;
}
public OnPlayerPickupStreamOut(pickupid, playerid)
{
if (pickupid == g_PlayerPickupHealth[playerid])
{
printf("g_PlayerPickupHealth est diffusé pour l'ID du joueur %d", playerid);
}
return 1;
}
```
## Rappels Relatives
Les rappels suivants peuvent être utiles, car ils sont liés à ce rappel d'une manière ou d'une autre.
- [OnPlayerPickUpPlayerPickup](OnPlayerPickUpPlayerPickup): Appelé lorsque qu'un joueur ramasse un objet joueur-pickup.
- [OnPlayerPickupStreamIn](OnPlayerPickupStreamIn): Appelé lorsque qu'un objet joueur-pickup entre dans la portée visuelle du joueur.
## Fonctions Relatives
Appelé lorsque qu'un objet joueur-pickup entre dans la portée visuelle du joueur.
- [CreatePlayerPickup](../functions/CreatePlayerPickup): Crée un objet joueur-pickup qui sera visible pour un seul joueur.
- [DestroyPlayerPickup](../functions/DestroyPlayerPickup): Détruit un objet joueur-pickup.
| openmultiplayer/web/docs/translations/fr/scripting/Callbacks/OnPlayerPickupStreamOut.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/fr/scripting/Callbacks/OnPlayerPickupStreamOut.md",
"repo_id": "openmultiplayer",
"token_count": 796
} | 391 |
---
title: OnRecordingPlaybackEnd
description: Ce rappel est appelé lorsque qu'un fichier enregistré reproduit avec StartRecordingPlayback a atteint sa fin.
tags: []
---
## Description
Ce rappel est appelé lorsque qu'un fichier enregistré reproduit avec NPC:[StartRecordingPlayback](../functions/StartRecordingPlayback) a atteint sa fin.
## Exemples
```c
public OnRecordingPlaybackEnd()
{
StartRecordingPlayback(PLAYER_RECORDING_TYPE_DRIVER, "all_around_lv_bus"); // Cela relancera le fichier enregistré une fois qu'il aura fini de se reproduire.
}
```
## Fonctions Relatives
Les fonctions suivantes peuvent être utiles, car elles sont liées à ce rappel d'une manière ou d'une autre.
- [StartRecordingPlayback](../functions/StartRecordingPlayback): Lance la reproduction d'un fichier .rec déjà enregistré.
- [StopRecordingPlayback](../functions/StopRecordingPlayback): Arrête la reproduction d'un fichier .rec.
| openmultiplayer/web/docs/translations/fr/scripting/Callbacks/OnRecordingPlaybackEnd.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/fr/scripting/Callbacks/OnRecordingPlaybackEnd.md",
"repo_id": "openmultiplayer",
"token_count": 323
} | 392 |
---
title: AddPlayerClassEx
description: Cette fonction est exactement la même que la fonction AddPlayerClass, avec l'ajout d'un paramètre d'équipe.
tags: ["player"]
---
## Description
Cette fonction est exactement la même que la fonction AddPlayerClass, avec l'ajout d'un paramètre d'équipe.
| Nom | Description |
| -------------- | ------------------------------------------------------------- |
| teamid | L'équipe dans laquelle vous voulez que le joueur apparaisse. |
| modelid | Le skin avec lequel le joueur apparaîtra. |
| Float:spawn_x | La coordonnée X de la position d'apparition de la classe. |
| Float:spawn_y | La coordonnée Y de la position d'apparition de la classe. |
| Float:spawn_z | La coordonnée Z de la position d'apparition de la classe. |
| Float:z_angle | La direction dans laquelle le joueur fera face après le frai. |
| weapon1 | La première arme d'apparition pour le joueur. |
| weapon1_ammo | La quantité de munitions pour la première arme d'apparition. |
| weapon2 | La deuxième arme d'apparition pour le joueur. |
| weapon2_ammo | La quantité de munitions pour la deuxième arme d'apparition. |
| weapon3 | La troisième arme d'apparition pour le joueur. |
| weapon3_ammo | La quantité de munitions pour la troisième arme d'apparition. |
## Retour
L'ID de la classe qui vient d'être ajoutée.
319 si la limite de classe (320) a été atteinte. L'ID de classe le plus élevé possible est 319.
## Exemples
```c
public OnGameModeInit()
{
// Les joueurs peuvent apparaître soit :
// CJ Skin (ID 0) dans l'équipe 1.
// "The Truth" skin (ID 1) dans l'équipe 2.
AddPlayerClassEx(1, 0, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0); // CJ
AddPlayerClassEx(2, 1, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0); // The Truth
return 1;
}
```
## Remarques
:::tip
L'ID de classe maximum est de 319 (à partir de 0, donc un total de 320 classes). Lorsque cette limite est atteinte, toute autre classe ajoutée remplacera l'ID 319.
:::
## Fonctions associées
- [AddPlayerClass](AddPlayerClass) : ajoutez une classe.
- [SetSpawnInfo](SetSpawnInfo) : définissez le paramètre d'apparition d'un joueur.
- [SetPlayerTeam](SetPlayerTeam) : définissez l'équipe d'un joueur.
- [SetPlayerSkin](SetPlayerSkin) : Définissez le skin d'un joueur.
| openmultiplayer/web/docs/translations/fr/scripting/functions/AddPlayerClassEx.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/fr/scripting/functions/AddPlayerClassEx.md",
"repo_id": "openmultiplayer",
"token_count": 1076
} | 393 |
---
title: Festőmunkák
description: Festési munkák alkalmazhatók meghatározott járműveken
---
Használható még vele [ChangeVehiclePaintjob](../functions/ChangeVehiclePaintjob)
Ez az oldal az elérhető összes festőmunkát tartalmazza. Minden festőmunka tartalmaz információt a jármű azonosítójáról és nevéről.
## Festőmunka táblázat
| Kép | Festőmunka ID | Jármű ID | Jármű neve |
| ------------------------------------------------------ | ------------- | -------- | ------------ |
|  | 0 | 483 | Camper |
|  | 0 | 534 | Remington |
|  | 1 | 534 | Remington |
|  | 2 | 534 | Remington |
|  | 0 | 535 | Slamvan |
|  | 1 | 535 | Slamvan |
|  | 2 | 535 | Slamvan |
|  | 0 | 536 | Blade |
|  | 1 | 536 | Blade |
|  | 2 | 536 | Blade |
|  | 0 | 558 | Uranus |
|  | 1 | 558 | Uranus |
|  | 2 | 558 | Uranus |
|  | 0 | 559 | Jester |
|  | 1 | 559 | Jester |
|  | 2 | 559 | Jester |
|  | 0 | 560 | Sultan |
|  | 1 | 560 | Sultan |
|  | 2 | 560 | Sultan |
|  | 0 | 561 | Stratum |
|  | 1 | 561 | Stratum |
|  | 2 | 561 | Stratum |
|  | 0 | 562 | Elegy |
|  | 1 | 562 | Elegy |
|  | 2 | 562 | Elegy |
|  | 0 | 565 | Flash |
|  | 1 | 565 | Flash |
|  | 2 | 565 | Flash |
|  | 0 | 567 | Savanna |
|  | 1 | 567 | Savanna |
|  | 2 | 567 | Savanna |
|  | 0 | 575 | Broadway |
|  | 1 | 575 | Broadway |
|  | 0 | 576 | Tornado |
|  | 1 | 576 | Tornado |
|  | 2 | 576 | Tornado |
## Kapcsolódó funkciók
- [ChangeVehiclePaintjob](../functions/ChangeVehiclePaintjob): Megváltoztatja a jármű festőmunkáját.
- [ChangeVehicleColor](ChangeVehicleColor): Beállítja a jármű színét.
- [OnVehiclePaintjob](../callbacks/OnVehiclePaintjob): Visszahívja, ha a jármű festőmunkája megváltozik. | openmultiplayer/web/docs/translations/hu/scripting/resources/paintjobs.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/hu/scripting/resources/paintjobs.md",
"repo_id": "openmultiplayer",
"token_count": 2516
} | 394 |
---
title: OnGameModeInit
description: Callback ini terpanggil ketika memuat gamemode.
tags: []
---
## Deskripsi
Callback ini akan terpanggil ketika sebuah gamemode dimuat.
## Contoh
```c
public OnGameModeInit()
{
print("Mode Game berhasil dimuat");
return 1;
}
```
## Catatan
:::tip
Fungsi ini dapat digunakan dalam sebuah filterscript untuk mendeteksi apakah sebuah gamemode berubah dengan perintah RCON seperti changemode atau gmx, sebagaimana gamemode tidak dapat memuat ulang filterscript.
:::
## Fungsi Terkait
| openmultiplayer/web/docs/translations/id/scripting/callbacks/OnGameModeInit.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/id/scripting/callbacks/OnGameModeInit.md",
"repo_id": "openmultiplayer",
"token_count": 211
} | 395 |
---
title: OnPlayerObjectMoved
description: Callback ini dipanggil ketika objek pemain dipindahkan setelah MovePlayerObject (ketika berhenti bergerak).
tags: ["player"]
---
## Deskripsi
Callback ini dipanggil ketika objek pemain dipindahkan setelah MovePlayerObject (ketika berhenti bergerak).
| Nama | Deskripsi |
| -------- | -------------------------------- |
| playerid | ID pemain yang ditugaskan |
| objectid | ID objek pemain yang dipindahkan |
## Returns
Selalu terpanggil pertama di filterscript.
## Contoh
```c
public OnPlayerObjectMoved(playerid, objectid)
{
printf("Player object moved: objectid: %d playerid: %d", objectid, playerid);
return 1;
}
```
## Catatan
:::tip
Callback ini juga bisa dipanggil untuk NPC.
:::
## Fungsi Terkait
- [MovePlayerObject](../functions/MovePlayerObject): Memindahkan objek pemain
- [IsPlayerObjectMoving](../functions/IsPlayerObjectMoving): Memeriksa apakah objek pemain bergerak
- [StopPlayerObject](../functions/StopPlayerObject): Menghentikan objek pemain agar tidak bergerak
- [CreatePlayerObject](../functions/CreatePlayerObject): Membuat sebuah objek untuk satu pemain
- [DestroyPlayerObject](../functions/DestroyPlayerObject): Menghancurkan objek pemain
| openmultiplayer/web/docs/translations/id/scripting/callbacks/OnPlayerObjectMoved.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/id/scripting/callbacks/OnPlayerObjectMoved.md",
"repo_id": "openmultiplayer",
"token_count": 448
} | 396 |
---
title: CancelEdit
description: Membatalkan mode mengedit objek untuk pemain.
tags: []
---
## Deskripsi
Membatalkan mode mengedit objek untuk pemain.
| Nama | Deskripsi |
| -------- | ------------------------------------------ |
| playerid | ID pemain untuk membatalkan edit. |
## Returns
Fungsi ini tidak mengembalikan nilai spesifik apapun.
## Contoh
```c
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp(cmdtext, "/stopedit", true))
{
CancelEdit(playerid);
SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Anda telah selesai mengedit objek!");
return 1;
}
return 0;
}
```
## Fungsi Terkait
- [SelectObject](SelectObject): Untuk memilih objek.
- [EditObject](EditObject): Untuk mengedit objek.
- [EditPlayerObject](EditPlayerObject): Untuk mengedit objek
- [EditAttachedObject](EditAttachedObject): Untuk menempelkan objek.
- [CreateObject](CreateObject): Untuk membuat object.
- [DestroyObject](DestroyObject): Untuk menghapus objek.
- [MoveObject](MoveObject): Untuk memindahkan objek.
| openmultiplayer/web/docs/translations/id/scripting/functions/CancelEdit.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/id/scripting/functions/CancelEdit.md",
"repo_id": "openmultiplayer",
"token_count": 423
} | 397 |
---
title: acos
description: Mengambil nilai kebalikan dari kosinus dalam derajat.
tags: ["math"]
---
<LowercaseNote />
## Deskripsi
Mengambil nilai kebalikan dari kosinus dalam derajat. Dalam trigonometri, arc cosinus adalah operasi kebalikan dari cosinus.
| Nama | Deskripsi |
| ----------- | ------------------------------------------------------------ |
| Float:value | nilai yang arc cosinusnya dihitung, dalam interval [-1,+1]. |
## Returns
Sudut dalam derajat, dalam interval [0.0,180.0].
## Contoh
```c
//The arc cosine of 0.500000 is 60.000000 degrees.
public OnGameModeInit()
{
new Float:param, Float:result;
param = 0.5;
result = acos(param);
printf("The arc cosine of %f is %f degrees.", param, result);
return 1;
}
```
## Fungsi Terkait
- [floatsin](floatsin): Dapatkan sinus dari sudut tertentu.
- [floatcos](floatcos): Dapatkan cosinus dari sudut tertentu.
- [floattan](floattan): Dapatkan garis singgung dari sudut tertentu.
- [asin](asin): Dapatkan value kebalikan dari sinus dalam derajat.
- [atan](atan): Dapatkan value kebalikan dari garis singgung dalam derajat.
- [atan2](atan2): Dapatkan value kebalikan multi-value dari sebuah garis singgung dalam derajat.
| openmultiplayer/web/docs/translations/id/scripting/functions/acos.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/id/scripting/functions/acos.md",
"repo_id": "openmultiplayer",
"token_count": 514
} | 398 |
---
id: mapicons
title: Ikon Peta
description: Daftar Ikon Peta
---
| ID | Ikon | Nama |
| --- | -------------------------------- | --------------------------------- |
| 0 |  | Kotak/Segitiga Berwarna (Dinamis) |
| 1 |  | Kotak Putih |
| 2 |  | Posisi Pemain |
| 3 |  | Player (Menu Map) |
| 4 |  | Utara (North) |
| 5 |  | Air Yard |
| 6 |  | Ammunation |
| 7 |  | Tempat cukur (Barber) |
| 8 |  | Big Smoke |
| 9 |  | Boat Yard |
| 10 |  | Burger Shot |
| 11 |  | Penambangan (Quarry) |
| 12 |  | Catalina |
| 13 |  | Cesar |
| 14 |  | Cluckin' Bell |
| 15 |  | Carl Johnson |
| 16 |  | C.R.A.S.H |
| 17 |  | Tempat Makan |
| 18 |  | Emmet |
| 19 |  | Serangan Musuh |
| 20 |  | Pemadam Kebakaran |
| 21 |  | Pacar |
| 22 |  | Rumah Sakit |
| 23 |  | Loco |
| 24 |  | Madd Dogg |
| 25 |  | Caligula's |
| 26 |  | MCs |
| 27 |  | Mod garage |
| 28 |  | OG Loc |
| 29 |  | Well Stacked Pizza Co |
| 30 |  | Polisi |
| 31 |  | Properti (Hijau) |
| 32 |  | Properti (Merah) |
| 33 |  | Balapan |
| 34 |  | Ryder |
| 35 |  | Save Game |
| 36 |  | Sekolah Mengemudi |
| 37 |  | Tidak diketahui |
| 38 |  | Sweet |
| 39 |  | Tattoo |
| 40 |  | The Truth |
| 41 |  | Titik Jalan |
| 42 |  | Toreno |
| 43 |  | Triads |
| 44 |  | Kasino Triads |
| 45 |  | Pakaian |
| 46 |  | Woozie |
| 47 |  | Zero |
| 48 |  | Club |
| 49 |  | Bar |
| 50 |  | Restoran |
| 51 |  | Truk |
| 52 |  | Perampokan |
| 53 |  | Balapan |
| 54 |  | Gym |
| 55 |  | Mobil |
| 56 |  | Lampu |
| 57 |  | Bandara terdekat |
| 58 |  | Varrios Los Aztecas |
| 59 |  | Ballas |
| 60 |  | Los Santos Vagos |
| 61 |  | San Fierro Rifa |
| 62 |  | Grove Street Families |
| 63 |  | Pay 'n' Spray |
## Fungsi Terkait
- [SetPlayerMapIcon](/docs/scripting/functions/SetPlayerMapIcon): Membuat sebuah mapicon untuk player.
| openmultiplayer/web/docs/translations/id/scripting/resources/mapicons.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/id/scripting/resources/mapicons.md",
"repo_id": "openmultiplayer",
"token_count": 3254
} | 399 |
---
id: vendingmachines
title: Mesin Penjual Otomatis
description: Daftar semua lokasi mesin penjual otomatis, pemain menggunakannya dengan jarak 2 unik. Sangat berguna untuk anti-cheat.
---
Eksterior:
```
-14.70, 1175.36, 18.95
201.02, -107.62, 0.90
662.43, -552.16, 15.71
-76.03, 1227.99, 19.13
1154.73, -1460.89, 15.16
1277.84, 372.52, 18.95
1398.84, 2222.61, 10.42
1520.15, 1055.27, 10.00
1634.11, -2237.53, 12.89
1659.46, 1722.86, 10.22
1729.79, -1943.05, 12.95
1789.21, -1369.27, 15.16
1928.73, -1772.45, 12.95
2060.12, -1897.64, 12.93
2085.77, 2071.36, 10.45
2139.52, -1161.48, 23.36
2153.23, -1016.15, 62.23
2271.73, -76.46, 25.96
2319.99, 2532.85, 10.22
2325.98, -1645.13, 14.21
2352.18, -1357.16, 23.77
2480.86, -1959.27, 12.96
2503.14, 1243.70, 10.22
-253.74, 2597.95, 62.24
-253.74, 2599.76, 62.24
2647.70, 1129.66, 10.22
2845.73, 1295.05, 10.79
-862.83, 1536.61, 21.98
-1350.12, 492.29, 10.59
-1350.12, 493.86, 10.59
-1455.12, 2591.66, 55.23
-1980.79, 142.66, 27.07
-2005.65, -490.05, 34.73
-2011.14, -398.34, 34.73
-2034.46, -490.05, 34.73
-2039.85, -398.34, 34.73
-2063.27, -490.05, 34.73
-2068.56, -398.34, 34.73
-2092.09, -490.05, 34.73
-2097.27, -398.34, 34.73
-2118.62, -422.41, 34.73
-2118.97, -423.65, 34.73
-2229.19, 286.41, 34.70
-2420.18, 985.95, 44.30
-2420.22, 984.58, 44.30
```
Interior:
```
2155.84, 1607.88, 1000.06
2155.91, 1606.77, 1000.05
2202.45, 1617.01, 1000.06
2209.24, 1621.21, 1000.06
2209.91, 1607.20, 1000.05
2222.20, 1606.77, 1000.05
2222.37, 1602.64, 1000.06
2225.20, -1153.42, 1025.91
-15.10, -140.23, 1003.63
-16.12, -91.64, 1003.63
-16.53, -140.30, 1003.63
-17.55, -91.71, 1003.63
-19.04, -57.84, 1003.63
-32.45, -186.70, 1003.63
-33.88, -186.77, 1003.63
330.68, 178.50, 1020.07
331.92, 178.50, 1020.07
-35.73, -140.23, 1003.63
350.91, 206.09, 1008.48
-36.15, -57.88, 1003.63
361.56, 158.62, 1008.48
371.59, 178.45, 1020.07
373.83, -178.14, 1000.73
374.89, 188.98, 1008.48
379.04, -178.88, 1000.73
495.97, -24.32, 1000.73
500.56, -1.37, 1000.73
501.83, -1.43, 1000.73
2576.70, -1284.43, 1061.09
```
| openmultiplayer/web/docs/translations/id/scripting/resources/vendingmachines.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/id/scripting/resources/vendingmachines.md",
"repo_id": "openmultiplayer",
"token_count": 1353
} | 400 |
---
title: ApplyActorAnimation
description: Włącza animację aktorowi.
tags: []
---
<VersionWarn version='SA-MP 0.3.7' />
## Opis
Włącza animację aktorowi.
| Nazwa | Opis |
| ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| actorid | ID aktora, któremu chcesz włączyć animację. |
| animlib[] | Biblioteka, z której ma być zastosowana animacja. |
| animname[] | Nazwa animacji, która ma zostać zastosowana (z powyższej biblioteki). |
| fDelta | Prędkość odtwarzania animacji (używaj 4.1). |
| loop | Jeżeli jest ustawione na 1, animacja będzie zapętlona. Jeżeli jest ustawione na 0, animacja zostanie odtworzona tylko raz. |
| lockx | Jeżeli jest ustawione na 0, aktor wróci do swojego starego koordynatu X po skończeniu animacji (w przypadku animacji, które poruszają aktorem, np. chodzenie). 1 nie przywróci go do starej pozycji. |
| locky | Tak samo jak powyżej, tyle że dla osi Y. Wartość powinna być taka sama, jak przy poprzednim parametrze. |
| freeze | Ustawienie tego na 1 zamrozi aktora po ukończeniu animacji. 0 tego nie zrobi. |
| time | Timer w milisekundach. Dla nieskończonej pętli powinien być ustawiony na 0. |
## Zwracane wartości
1: Funkcja wykonała się prawidłowo.
0: Funkcja nie wykonała się prawidłowo. Podany aktor nie istnieje.
## Przykłady
```c
new gMyActor;
public OnGameModeInit()
{
gMyActor = CreateActor(179, 316.1, -134.0, 999.6, 90.0); // Aktor jako sprzedawca w Ammu-Nation
ApplyActorAnimation(gMyActor, "DEALER", "shop_pay", 4.1, 0, 0, 0, 0, 0); // Animacja płacenia
return 1;
}
```
## Uwagi
:::tip
Musisz wstępnie załadować bibliotekę animacji graczowi, u którego animacja będzie wyświetlana, a nie samemu aktorowi. W przeciwnym wypadku, animacja aktora nie zostanie włączona do momentu ponownego uruchomienia funkcji.
:::
## Powiązane funkcje
- [ClearActorAnimations](ClearActorAnimations.md): Wyłącza wszystkie animacje, które aktor ma włączone.
| openmultiplayer/web/docs/translations/pl/scripting/functions/ApplyActorAnimation.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/pl/scripting/functions/ApplyActorAnimation.md",
"repo_id": "openmultiplayer",
"token_count": 2128
} | 401 |
---
title: OnIncomingConnection
description: Esta callback é chamada quando um endereço de IP tenta conectar no servidor.
tags: []
---
## Descrição
Esta callback é chamada quando um endereço de IP tenta conectar no servidor. Para bloquear tentativas de conexão, use BlockIpAddress.
| Nome | Descrição |
| ------------ | ------------------------------------- |
| playerid | O ID do jogador que tentou conectar |
| ip_address[] | O IP do jogador que tentou conectar |
| port | A porta de conexão usada na tentativa |
## Retorno
1 - Irá previnir que outro filterscript receba esta callback
0 - Indica que esta callback será passada para o próximo filterscript.
Sempre é chamada primeiro em filterscripts.
## Exemplos
```c
public OnIncomingConnection(playerid, ip_address[], port)
{
printf("Há uma tentativa de conexão do jogador de ID %i [IP/port: %s:%i]", playerid, ip_address, port);
return 1;
}
```
## Funções Relacionadas
- [BlockIpAddress](../functions/BlockIpAddress.md): Bloqueia um IP de entrar no servidor por determinado tempo.
- [UnBlockIpAddress](../functions/UnBlockIpAddress.md): Desbloqueia um IP previamente bloqueado.
| openmultiplayer/web/docs/translations/pt-BR/scripting/callbacks/OnIncomingConnection.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/pt-BR/scripting/callbacks/OnIncomingConnection.md",
"repo_id": "openmultiplayer",
"token_count": 453
} | 402 |
---
title: OnPlayerDisconnect
description: Esta callback é chamada quando um jogador disconecta do servidor.
tags: ["player"]
---
## Descrição
Esta callback é chamada quando um jogador disconecta do servidor.
| Nome | Descrição |
| -------- | ---------------------------------------------------------------- |
| playerid | O ID do jogador que disconectou |
| reason | O motivo pela qual o jogador desconectou (veja a tabela abaixo). |
## Retorno
1 - Irá previnir que outro filterscript receba esta callback.
0 - Indica que esta callback será passada para o próximo filterscript.
Sempre é chamada primeiro em filterscripts.
## Exemplos
```c
public OnPlayerDisconnect(playerid, reason)
{
new
szString[64],
playerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, playerName, MAX_PLAYER_NAME);
new szDisconnectReason[3][] =
{
"Timeout/Crash",
"Quit",
"Kick/Ban"
};
format(szString, sizeof szString, "%s desconectou do servidor (%s).", playerName, szDisconnectReason[reason]);
SendClientMessageToAll(0xC4C4C4FF, szString);
return 1;
}
```
## Notas
:::tip
Algumas funções podem não funcionar corretamente quando usadas nesta callback pois o jogador já está desconectado quando a callback é chamada. Isso significa que você não pode ter informações inequívocas de funções como GetPlayerIp e GetPlayerPos.
:::
## Funções Relacionadas
| openmultiplayer/web/docs/translations/pt-BR/scripting/callbacks/OnPlayerDisconnect.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/pt-BR/scripting/callbacks/OnPlayerDisconnect.md",
"repo_id": "openmultiplayer",
"token_count": 627
} | 403 |
---
title: OnPlayerPickUpPickup
description: Esta callback é chamada quando um jogador coleta um pickup criado com CreatePickup.
tags: ["player"]
---
## Descrição
Esta callback é chamada quando um jogador coleta um pickup criado com CreatePickup.
| Nome | Descrição |
| -------- | ------------------------------------------------- |
| playerid | O ID do jogador que coletou o pickup. |
| pickupid | O ID do pickup retornado através do CreatePickup. |
## Retorno
Sempre é chamado primeiro na gamemode.
## Exemplos
```c
new pickup_Dinheiro;
new pickup_Vida;
public OnGameModeInit()
{
pickup_Dinheiro = CreatePickup(1274, 2, 0.0, 0.0, 9.0);
pickup_Vida = CreatePickup(1240, 2, 0.0, 0.0, 9.0);
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if (pickupid == pickup_Dinheiro)
{
GivePlayerMoney(playerid, 1000);
}
else if (pickupid == pickup_Vida)
{
SetPlayerHealth(playerid, 100.0);
}
return 1;
}
```
## Funções Relacionadas
- [CreatePickup](../functions/CreatePickup): Cria um Pickup.
- [DestroyPickup](../functions/DestroyPickup): Destrói um Pickup.
| openmultiplayer/web/docs/translations/pt-BR/scripting/callbacks/OnPlayerPickUpPickup.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/pt-BR/scripting/callbacks/OnPlayerPickUpPickup.md",
"repo_id": "openmultiplayer",
"token_count": 496
} | 404 |
---
title: OnUnoccupiedVehicleUpdate
description: Essa callback é executada quando o cliente do jogador faz o update/sincroniza a posição de um veículo no qual o mesmo não está dirigindo.
tags: ["vehicle"]
---
## Descrição
Essa callback é executada quando o cliente do jogador faz o update/sincroniza a posição de um veículo no qual o mesmo não está dirigindo.
| Nome | Descrição |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| vehicleid | ID do veículo que teve sua posição atualizada/sincronizada. |
| playerid | ID do jogador que fez o pedido para atualizar/sincronizar o veículo. |
| passenger_seat | ID dos assentos, caso o jogador seja um passageiro. 0=não está no veículo, 1=passageiro frontal, 2=traseiro esquerda, 3=traseiro direita, 4+ caso o veículo seja um ônibus etc. com a quantidade de assentos. |
| new_x | Nova coordenada X do veículo. |
| new_y | Nova coordenada Y do veículo. |
| new_z | Nova coordenada Z do veículo. |
| vel_x | Nova velocidade X do veículo. |
| vel_y | Nova velocidade Y do veículo. |
| vel_z | Nova velocidade Z do veículo. |
## Retornos
Sempre execurada primeiro nos filterscripts, retorne 0 para impedir que outros scripts a vejam.
## Exemplos
```c
public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z)
{
// Verifica se o veículo está se movendo para longe
if (GetVehicleDistanceFromPoint(vehicleid, new_x, new_y, new_z) > 50.0)
{
// Rejeita o update
return 0;
}
return 1;
}
```
## Notas
:::warning
Essa callback é executada com frequência a cada segundo, por veículo não ocupado. Você deve evitar realizar grandes operações de gravação e leitura de arquivos. A função GetVehiclePos irá retornar coordenadas antigas da posição do veículo (antes do update).
:::
| openmultiplayer/web/docs/translations/pt-BR/scripting/callbacks/OnUnoccupiedVehicleUpdate.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/pt-BR/scripting/callbacks/OnUnoccupiedVehicleUpdate.md",
"repo_id": "openmultiplayer",
"token_count": 1839
} | 405 |
---
title: AddStaticPickup
description: Esta função adiciona um pickup 'fixo' no jogo.
tags: []
---
## Descrição
Esta função adiciona um pickup 'fixo' no jogo. Esses pickups suportam armas, vida, colete, etc, com a capacidade de funcionar sem scripts (armas/vida/colete são definidos automaticamente).
| Nome | Descrição |
| ----------------------------------- | --------------------------------------------------------------------------------------------- |
| [model](../resources/pickupids.md) | O modelo do pickup. |
| [type](../resources/pickuptypes.md) | O tipo de pickup. Determina como o pickup reage quando é coletado. |
| Float:X | A coordenada-X para colocar o pickup. |
| Float:Y | A coordenada-Y para colocar o pickup. |
| Float:Z | A coordenada-Z para colocar o pickup. |
| virtualworld | O ID do mundo virtual para colocar o pickup. Use -1 para mostrar o pickup em todos os mundos. |
## Retorno
1 se o pickup é criado com sucesso.
0 se falhar ao criar.
## Exemplos
```c
public OnGameModeInit()
{
// Cria um pickup para colete.
AddStaticPickup(1242, 2, 1503.3359, 1432.3585, 10.1191, 0);
// Cria um pickup para alguma vida, bem ao lado do colete.
AddStaticPickup(1240, 2, 1506.3359, 1432.3585, 10.1191, 0);
return 1;
}
```
## Notas
:::tip
Esta função não retorna um pickup ID que você pode usar, por exemplo, em OnPlayerPickUpPickup. Use CreatePickup se desejar atribuir IDs.
:::
## Funções Relacionadas
- [CreatePickup](CreatePickup.md): Cria um pickup.
- [DestroyPickup](DestroyPickup.md): Destrói um pickup.
- [OnPlayerPickUpPickup](../callbacks/OnPlayerPickUpPickup.md): É chamado quando um jogador pega num pickup.
| openmultiplayer/web/docs/translations/pt-BR/scripting/functions/AddStaticPickup.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/pt-BR/scripting/functions/AddStaticPickup.md",
"repo_id": "openmultiplayer",
"token_count": 1094
} | 406 |
---
title: CreateObject
description: Cria um objeto em coordenadas especificadas no mundo do jogo.
tags: []
---
## Descrição
Cria um objeto em coordenadas especificadas no mundo do jogo.
| Nome | Descrição |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| modelid | O modelo do objeto. |
| Float:X | A coordenada X para criar o objeto. |
| Float:Y | A coordenada Y para criar o objeto. |
| Float:Z | A coordenada Z para criar o objeto. |
| Float:rX | A rotação X para criar o objeto. |
| Float:rY | A rotação Y para criar o objeto. |
| Float:rZ | A rotação Z para criar o objeto. |
| Float:DrawDistance | (Opcional) A distância de renderização do objeto no mapa. 0.0 fará com que os objetos sejam renderizados em suas distâncias padrão. Utilizável desde 0.3b. Limitado a 300 antes de 0,3x. |
## Exemplos
```c
public OnGameModeInit()
{
CreateObject(2587, 2001.195679, 1547.113892, 14.283400, 0.0, 0.0, 96.0); // O objeto será renderizado em sua distância padrão.
CreateObject(2587, 2001.195679, 1547.113892, 14.283400, 0.0, 0.0, 96.0, 300.0); // O objeto será renderizado em 300.0 metros de distância.
return 1;
}
```
## Notas
:::tip
Há um limite de 1000 objetos (MAX_OBJECTS). Para contornar esse limite, você pode usar um streamer.
:::
## Funções relacionadas
- [DestroyObject](DestroyObject): Destrua um objeto.
- [IsValidObject](IsValidObject): Verifica se um determinado objeto é válido.
- [MoveObject](MoveObject): Move um objeto.
- [StopObject](StopObject): Pare a movimentação de um objeto.
- [SetObjectPos](SetObjectPos): Define a posição de um objeto.
- [SetObjectRot](SetObjectRot): Define a rotação de um objeto.
- [GetObjectPos](GetObjectPos): Localize a posição de um objeto.
- [GetObjectRot](GetObjectRot): Localize a rotação de um objeto.
- [AttachObjectToPlayer](AttachObjectToPlayer): Anexa um objeto a um jogador.
- [SetObjectMaterialText](SetObjectMaterialText): Substitua a textura de um objeto por texto.
- [SetObjectMaterial](SetObjectMaterial): Substitua a textura de um objeto pela textura de outro modelo no jogo.
- [CreatePlayerObject](CreatePlayerObject): Cria um objeto para apenas um jogador.
- [DestroyPlayerObject](DestroyPlayerObject): Destrua um objeto do jogador.
- [IsValidPlayerObject](IsValidPlayerObject): Verifica se um determinado objeto player é válido.
- [MovePlayerObject](MovePlayerObject): Move um objeto do jogador.
- [StopPlayerObject](StopPlayerObject): Pare a movimentação de um objeto do jogador.
- [SetPlayerObjectPos](SetPlayerObjectPos): Define a posição de um objeto do jogador.
- [SetPlayerObjectRot](SetPlayerObjectRot): Defina a rotação de um objeto do jogador.
- [GetPlayerObjectPos](GetPlayerObjectPos): Localize a posição de um objeto do jogador.
- [GetPlayerObjectRot](GetPlayerObjectRot): Localize a rotação de um objeto do jogador.
- [AttachPlayerObjectToPlayer](AttachPlayerObjectToPlayer): Anexa um objeto de jogador a um jogador
- [SetPlayerObjectMaterialText](SetPlayerObjectMaterialText): Substitua a textura de um objeto de jogador por texto.
- [SetPlayerObjectMaterial](SetPlayerObjectMaterial): Substitua a textura de um objeto do jogador pela textura de outro modelo no jogo. | openmultiplayer/web/docs/translations/pt-BR/scripting/functions/CreateObject.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/pt-BR/scripting/functions/CreateObject.md",
"repo_id": "openmultiplayer",
"token_count": 2174
} | 407 |
---
title: GetGravity
description: Obtém a gravidade atualmente definida.
tags: []
---
## Descrição
Obtém a gravidade atualmente definida.
## Exemplos
```c
#if !defined GetGravity
native Float:GetGravity();
#endif
printf("Gravidade atual: %f", GetGravity());
```
## Notas
:::warning
Esta função não está definida por padrão. Adicione 'native Float:GetGravity();' na inclusão a_samp.inc para usá-la.
:::
## Funções Relacionadas
- [SetGravity](SetGravity): Define a gravidade global.
| openmultiplayer/web/docs/translations/pt-BR/scripting/functions/GetGravity.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/pt-BR/scripting/functions/GetGravity.md",
"repo_id": "openmultiplayer",
"token_count": 202
} | 408 |
---
title: SetActorHealth
description: Define a vida de um ator.
tags: []
---
Esta função foi implementada no SA-MP 0.3.7 e não funcionará em versões anteriores.
## Descrição
Define a vida de um ator.
| Nome | Descrição |
| ------------ | -------------------------------------- |
| actorid | O ID do ator a definir a vida. |
| Float:health | O valor a definir para a vida do ator. |
## Retorno
1 - Sucesso
0 - Falha (por exemplo, o ator não está criado).
## Exemplos
```c
new gMyActor;
public OnGameModeInit()
{
gMyActor = CreateActor(179, 316.1, -134.0, 999.6, 90.0); // Ator como vendedor na Ammunation
SetActorHealth(gMyActor, 100);
return 1;
}
```
## Funções Relacionadas
| openmultiplayer/web/docs/translations/pt-BR/scripting/functions/SetActorHealth.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/pt-BR/scripting/functions/SetActorHealth.md",
"repo_id": "openmultiplayer",
"token_count": 331
} | 409 |
---
title: strcmp
description: Compara duas strings para ver se são iguais.
tags: ["string"]
---
<LowercaseNote />
## Descrição
Compara duas strings para ver se são iguais.
| Name | Description |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| string1 | A primeira string a ser comparada. |
| string2 | A segunda string a ser comparada. |
| ignorecase (opcional) | Quando definido como true, o caso não importa - oLÁ é o mesmo que Olá. Quando "false", eles não são os mesmos. |
| length (optional) | Quando esse comprimento é definido, os primeiros x caracteres serão comparados - fazendo "Olá Mundo" e "Olá" com um comprimento de 3 dirá que é a mesma string. |
## Retorno
0 se as strings combinam entre si em determinado comprimento;
1 ou -1 se algum caractere não combina: string1[i] - string2[i] ('i' representa o índice de caracteres começando em 0); Diferença no número de caracteres se uma string corresponde apenas a parte de outra string.
## Exemplos
```c
new string1[] = "Olá Mundo";
new string2[] = "Olá Mundo";
// Verifica se as strings são iguais
if (!strcmp(string1, string2))
new string3[] = "Olá";
// Verifica se os primeiros 3 caracteres correspondem
if (!strcmp(string2, string3, false, 3))
// Verifique se há strings nulas com isnull ()
if (!strcmp(string1, string2) && !isnull(string1) && !isnull(string2))
// Definição para isnull():
#if !defined isnull
#define isnull(%1) ((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))
#endif
```
## Notas
:::warning
Esta função retorna 0 se uma das strings estiver vazia. Verifique se há strings nulas com isnull(). Se você comparar strings de um arquivo de texto, você deve levar em consideração os caracteres especiais 'carriage return' e 'new line' (\r \n), conforme eles são incluídos, ao usar fread().
:::
## Funções Relacionadas
- [strfind](strfind): Procure uma string em outra string.
- [strdel](strdel): Excluir parte de uma string.
- [strins](../function/strins): Inserir texto em uma string.
- [strlen](../function/strlen): Obter o comprimento de uma string.
- [strmid](strmid): Extraia parte de uma string em outra string.
- [strpack](strpack): Empacote uma string em uma string de destino.
- [strval](strval): Converter uma string em um número inteiro.
- [strcat](strcat): Concatene duas strings em uma referência de destino.
- https://www.facom.ufu.br/~madriana/PP/TP6.pdf
| openmultiplayer/web/docs/translations/pt-BR/scripting/functions/strcmp.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/pt-BR/scripting/functions/strcmp.md",
"repo_id": "openmultiplayer",
"token_count": 1397
} | 410 |
---
title: "Compensação de lag"
description: Explicando a compensação de lag.
---
A compensação de atraso para balas disparadas é habilitada por padrão em servidores SA-MP desde 0.3z. Isso pode ser alterado usando a variável de servidor `lagcompmode` no [server.cfg](server.cfg). Definindo para 0 vai desativar completamente a compensação de lag e os players vão ter que controlar os seus disparos (disparando à frente dos alvos).
Desativando a compensação de lag vai impedir [OnPlayerWeaponShot](../scripting/callbacks/OnPlayerWeaponShot) de ser chamado.
Essa variável pode apenas ser definida no [server.cfg](server.cfg).
| openmultiplayer/web/docs/translations/pt-BR/server/LagCompensation.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/pt-BR/server/LagCompensation.md",
"repo_id": "openmultiplayer",
"token_count": 217
} | 411 |
---
title: OnIncomingConnection
description: Acest callback este apelat atunci când o adresă IP încearcă să se conecteze la server.
tags: []
---
## Descriere
This callback is called when an IP address attempts a connection to the server. To block incoming connections, use BlockIpAddress.
| Name | Description |
| ------------ | -------------------------------------------------- |
| playerid | The ID of the player attempting to connect |
| ip_address[] | The IP address of the player attempting to connect |
| port | The port of the attempted connection |
## Returnări
1 - Va împiedica alte filterscript-uri să primească acest apel invers.
0 - Indică faptul că acest callback va fi transmis următorului filterscript.
Este întotdeauna numit primul în filterscript-uri.
## Exemple
```c
public OnIncomingConnection(playerid, ip_address[], port)
{
printf("Incoming connection for player ID %i [IP/port: %s:%i]", playerid, ip_address, port);
return 1;
}
```
## Funcții similare
- [BlockIpAddress](../functions/BlockIpAddress): Blocați conectarea unei adrese IP la server pentru o anumită perioadă de timp.
- [UnBlockIpAddress](../functions/UnBlockIpAddress): Deblocați un IP care a fost blocat anterior. | openmultiplayer/web/docs/translations/ro/scripting/callbacks/OnIncomingConnection.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/ro/scripting/callbacks/OnIncomingConnection.md",
"repo_id": "openmultiplayer",
"token_count": 488
} | 412 |
---
title: OnPlayerExitedMenu
description: Apelat când un jucător iese dintr-un meniu.
tags: ["player", "menu"]
---
## Descriere
Apelat când un jucător iese dintr-un meniu.
| Nume | Descriere |
| -------- | ----------------------------------------- |
| playerid | ID-ul jucătorului care a ieșit din meniu |
## Returns
Este întotdeauna numit primul în modul de joc.
## Exemple
```c
public OnPlayerExitedMenu(playerid)
{
TogglePlayerControllable(playerid,1); // dezgheață playerul când iese dintr-un meniu
return 1;
}
```
## Funcții similare
- [CreateMenu](../functions/CreateMenu): Creați un meniu.
- [DestroyMenu](../functions/DestroyMenu): Distrugeți un meniu. | openmultiplayer/web/docs/translations/ro/scripting/callbacks/OnPlayerExitedMenu.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/ro/scripting/callbacks/OnPlayerExitedMenu.md",
"repo_id": "openmultiplayer",
"token_count": 315
} | 413 |
---
title: OnPlayerStateChange
description: Acest callback este apelat atunci când un jucător își schimbă starea.
tags: ["player"]
---
## Descriere
Acest callback este apelat atunci când un jucător își schimbă starea.
| Nume | Descriere |
| -------- | ---------------------------------------- |
| playerid | ID-ul jucătorului care și-a schimbat starea. |
| newstate | Noua stare a jucătorului. |
| oldstate | Starea anterioară a jucătorului. |
Consultați [Starile jucătorului](../resources/playerstates) pentru o listă a tuturor stărilor de jucător disponibile.
## Returnări
It is always called first in filterscripts.
## Exemple
```c
public OnPlayerStateChange(playerid, PLAYER_STATE:newstate, PLAYER_STATE:oldstate)
{
if (oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER) // Jucătorul a intrat într-un vehicul ca șofer
{
new vehicleid = GetPlayerVehicleID(playerid);
AddVehicleComponent(vehicleid, 1010); // Adăugați NOS la vehicul
}
return 1;
}
```
## Note
<TipNPCCallbacks />
## Funcții similare
- [GetPlayerState](../functions/GetPlayerState): Obțineți starea actuală a unui jucător.
- [GetPlayerSpecialAction](../functions/GetPlayerSpecialAction): Obțineți acțiunea specială curentă a unui jucător.
- [SetPlayerSpecialAction](../functions/SetPlayerSpecialAction): Setează acțiunea specială a unui jucător. | openmultiplayer/web/docs/translations/ro/scripting/callbacks/OnPlayerStateChange.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/ro/scripting/callbacks/OnPlayerStateChange.md",
"repo_id": "openmultiplayer",
"token_count": 618
} | 414 |
---
title: OnVehicleRespray
description: Acest callback este apelat atunci când un jucător iese dintr-un magazin de mod, chiar dacă culorile nu au fost schimbate.
tags: ["vehicle"]
---
## Descriere
Acest callback este apelat atunci când un jucător iese dintr-un magazin de mod, chiar dacă culorile nu au fost schimbate. Atenție, numele este ambiguu, magazinele Pay 'n' Spray nu apelează la acest apel.
| Nume | Descriere |
| --------- | ------------------------------------------------------------ |
| playerid | ID-ul jucătorului care conduce vehiculul. |
| vehicleid | ID-ul vehiculului care a fost pulverizat. |
| color1 | Culoarea în care a fost schimbată culoarea principală a vehiculului. |
| color2 | Culoarea în care a fost schimbată culoarea secundară a vehiculului. |
## Returnări
It is always called first in gamemode so returning 0 there also blocks other filterscripts from seeing it.
## Exemple
```c
public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
new string[48];
format(string, sizeof(string), "Ați modificat vehiculul %d în culorile %d și %d!", vehicleid, color1, color2);
SendClientMessage(playerid, COLOR_GREEN, string);
return 1;
}
```
## Note
:::tip
Acest apel invers nu este apelat de ChangeVehicleColor. În mod înșelător, acest apel invers nu este apelat pentru pay 'n' spray (doar modshop-uri).
Remediați aici: http://pastebin.com/G81da7N1
:::
:::warning
Erori cunoscute: previzualizarea unei componente într-un magazin de mod ar putea apela acest apel invers.
:::
## Funcții similare
- [ChangeVehicleColor](../functions/ChangeVehicleColor): Setați culoarea unui vehicul.
- [ChangeVehiclePaintjob](../functions/ChangeVehiclePaintjob): Schimbați vopsirea unui vehicul.
- [OnVehiclePaintjob](OnVehiclePaintjob): apelat atunci când se modifică vopsirea unui vehicul.
- [OnVehicleMod](OnVehicleMod): Apelat atunci când un vehicul este modificat.
- [OnEnterExitModShop](OnEnterExitModShop): apelat atunci când un vehicul intră sau iese dintr-un magazin de mod. | openmultiplayer/web/docs/translations/ro/scripting/callbacks/OnVehicleRespray.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/ro/scripting/callbacks/OnVehicleRespray.md",
"repo_id": "openmultiplayer",
"token_count": 893
} | 415 |
---
title: ShowPlayerDialog
description: Afișează jucătorlui un dialog sincron (doar unul o dată).
tags: ["player"]
---
## Description
Afișează jucătorlui un dialog sincron (doar unul o dată).
| Nume | Descriere |
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| playerid | ID-ul jucătorului căruia i se arată dialogul. |
| dialogid | ID-ul dialogului, pentru ca răspunsurile să poată fi prelucrate. Maximul pentru dialogid e 32767. Dacă se folosesc valori negative atunci se va închide orice dialog deschis. |
| style | [Stilul](../resources/dialogstyles.md) dialogului. |
| caption[] | Titlul de sus al dialogului. Lungimea lui nu poate depăși 64 de caractere, altfel începe să se taie. |
| info[] | Textul afișat în partea principală a dialogului. Folosiți \n pentru a începe o nouă linie și \t pentru tabulatură. |
| button1[] | Textul butonului din stânga. |
| button2[] | Textul butonului din dreapta. Lăsați-l gol ( "" ) pentru a-l ascunde. |
## Returnări
1: Funcția a fost executată cu succes.
0: Executarea funcției a eșuat. Asta înseamnă că jucătorului nu e conectat.
## Exemple
```c
// Definim ID-urile dialogurilor folosind un enum:
enum
{
DIALOG_NULL,
DIALOG_LOGIN,
DIALOG_WELCOME,
DIALOG_WEAPONS
}
// Sau macro-uri:
#define DIALOG_NULL 0
#define DIALOG_LOGIN 1
#define DIALOG_WELCOME 2
#define DIALOG_WEAPONS 3
// Enum-urile sunt recomandate, fiindcă nu trebuie să ținem coint de ID-urile folosite. Totuși, enum-urile folosesc memorie pentru a stoca, pe când define-urile sunt procesate în stadiul de compilare.
// Exemplu pentru DIALOG_STYLE_MSGBOX:
ShowPlayerDialog(playerid, DIALOG_WELCOME, DIALOG_STYLE_MSGBOX, "Notice", "Ai fost conectat la server!", "Close", "");
// Exemplu pentru DIALOG_STYLE_INPUT:
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Login", "Introdu parola mai jos:", "Login", "Cancel");
// Exemplu pentru DIALOG_STYLE_LIST:
ShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_LIST, "Weapons", "AK47\nM4\nSniper Rifle", "Option 1", "Option 2");
// Exemplu pentru DIALOG_STYLE_PASSWORD:
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "Introdu parola mai jos:", "Login", "Cancel");
// Exemplu pentru DIALOG_STYLE_TABLIST:
ShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_TABLIST, "Buy Weapon", "Deagle\t$5000\t100\nSawnoff\t$5000\t100\nPistol\t$1000\t50", "Select", "Cancel");
// Exemplu pentru DIALOG_STYLE_TABLIST_HEADERS:
ShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_TABLIST_HEADERS, "Buy Weapon", "Weapon\tPrice\tAmmo\nDeagle\t$5000\t100\nSawnoff\t$5000\t100\nPistol\t$1000\t50", "Select", "Cancel");
```
## Note
:::tip
Este recomandat să se folosească enumerații (vezi mai sus) sau definiții (#define) pentru a determina care ID-uri sunt ale căror dialoguri, pentru ca pe viitor să se evite confuzia.
:::
:::tip
Folosește color embedding pentru mai multe culori în text. Folosind -1 ca și dialogid închide toate dialog-urile deschise pe ecranul clientului.
:::
## Funcții Asociate
- [TextDrawShowForPlayer](TextDrawShowForPlayer.md): Arată un textdraw unui jucător.
- [OnDialogResponse](../callbacks/OnDialogResponse.md): Apelat atunci când un jucător răspunde unui dialog.
| openmultiplayer/web/docs/translations/ro/scripting/functions/ShowPlayerDialog.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/ro/scripting/functions/ShowPlayerDialog.md",
"repo_id": "openmultiplayer",
"token_count": 2210
} | 416 |
---
title: Sursa Clickului
description: Sursa Clickului
---
Se foloseste cu [OnPlayerClickPlayer](../callbacks/OnPlayerClickPlayer)
| Valoare | Simbol constant |
| ------- | ----------------------- |
| 0 | CLICK_SOURCE_SCOREBOARD |
| - | - |
| openmultiplayer/web/docs/translations/ro/scripting/resources/clicksources.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/ro/scripting/resources/clicksources.md",
"repo_id": "openmultiplayer",
"token_count": 124
} | 417 |
---
title: Tutoriale
description: O colectie de tutoriale pentru a te ajuta la crearea gamemode-ului.
---
În această secțiune, veți găsi o colecție de tutoriale pentru a vă ajuta să scrieți moduri de joc și să vă gestionați serverul. Ele nu au o ordine specială.
| openmultiplayer/web/docs/translations/ro/tutorials/_.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/ro/tutorials/_.md",
"repo_id": "openmultiplayer",
"token_count": 119
} | 418 |
---
title: AddCharModel
description: Добавляет новую стороннюю модель ( скин ) игрока для скачивания.
tags: []
---
<VersionWarn version='SA-MP 0.3.DL R1' />
## Описание
Функция добавляет новую стороннюю модель ( скин ) игрока для скачивания. Файл модели будет помещен в папку на компьютер игрока Documents\GTA San Andreas User Files\SAMP\cache под названием IP и Порта сервера в виде CRC формы.
| Параметр | Описание |
| -------- | -------------------------------------------------------------------------------------------------------------- |
| baseid | ID существующей базовой модели - скина ( для копирования поведения скина и замены скина при ошибке загрузки ) |
| newid | Новый ID скина в пределах от 20000 до 30000 (10000 слотов) для использования в SetPlayerSkin |
| dffname | Название .dff файла колизии модели, расположенного стандартно в папке models (параметр настройки artpath). |
| txdname | Название .txd файла текстур модели, расположенного стандартно в папке models (параметр настройки artpath). |
## Возвращаемые данные
1: Функция выполнена успешно
0: Функция не выполнена
## Примеры
```c
public OnGameModeInit()
{
AddCharModel(305, 20001, "lvpdpc2.dff", "lvpdpc2.txd");
AddCharModel(305, 20002, "lapdpd2.dff", "lapdpd2.txd");
return 1;
}
```
```c
AddCharModel(305, 20001, "lvpdpc2.dff", "lvpdpc2.txd");
AddCharModel(305, 20002, "lapdpd2.dff", "lapdpd2.txd");
```
## Примечания
:::tip
useartwork должна быть включена ( 1 ) в настройках сервера, чтобы данная функция работала
:::
:::warning
В данный момент нет ограничений для вызова данной функции, но учтите, что если вы вызываете функцию НЕ в OnFilterScriptInit/OnGameModeInit, то у игроков, которые находяться на сервере, могут не быть скачаны данные файлы модели.
:::
## Связанные Функции
- [SetPlayerSkin](SetPlayerSkin.md): Устанавливает скин игрока.
| openmultiplayer/web/docs/translations/ru/scripting/functions/AddCharModel.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/ru/scripting/functions/AddCharModel.md",
"repo_id": "openmultiplayer",
"token_count": 1548
} | 419 |
---
title: "Color Fix"
descripion: Базовый скрипт для добавления большего количества цветов для ников игроков.
---
Этот туториал предназначен для работы с [GetPlayerColor](../scripting/functions/GetPlayerColor), если вы не используете [SetPlayerColor](../scripting/functions/SetPlayerColor) в вашем скрипте при подключении игрока.
```c
new PlayerColors[] = {
0xFF8C13FF,0xC715FFFF,0x20B2AAFF,0xDC143CFF,0x6495EDFF,0xf0e68cFF,0x778899FF,0xFF1493FF,0xF4A460FF,0xEE82EEFF,
0xFFD720FF,0x8b4513FF,0x4949A0FF,0x148b8bFF,0x14ff7fFF,0x556b2fFF,0x0FD9FAFF,0x10DC29FF,0x534081FF,0x0495CDFF,
0xEF6CE8FF,0xBD34DAFF,0x247C1BFF,0x0C8E5DFF,0x635B03FF,0xCB7ED3FF,0x65ADEBFF,0x5C1ACCFF,0xF2F853FF,0x11F891FF,
0x7B39AAFF,0x53EB10FF,0x54137DFF,0x275222FF,0xF09F5BFF,0x3D0A4FFF,0x22F767FF,0xD63034FF,0x9A6980FF,0xDFB935FF,
0x3793FAFF,0x90239DFF,0xE9AB2FFF,0xAF2FF3FF,0x057F94FF,0xB98519FF,0x388EEAFF,0x028151FF,0xA55043FF,0x0DE018FF,
0x93AB1CFF,0x95BAF0FF,0x369976FF,0x18F71FFF,0x4B8987FF,0x491B9EFF,0x829DC7FF,0xBCE635FF,0xCEA6DFFF,0x20D4ADFF,
0x2D74FDFF,0x3C1C0DFF,0x12D6D4FF,0x48C000FF,0x2A51E2FF,0xE3AC12FF,0xFC42A8FF,0x2FC827FF,0x1A30BFFF,0xB740C2FF,
0x42ACF5FF,0x2FD9DEFF,0xFAFB71FF,0x05D1CDFF,0xC471BDFF,0x94436EFF,0xC1F7ECFF,0xCE79EEFF,0xBD1EF2FF,0x93B7E4FF,
0x3214AAFF,0x184D3BFF,0xAE4B99FF,0x7E49D7FF,0x4C436EFF,0xFA24CCFF,0xCE76BEFF,0xA04E0AFF,0x9F945CFF,0xDCDE3DFF,
0x10C9C5FF,0x70524DFF,0x0BE472FF,0x8A2CD7FF,0x6152C2FF,0xCF72A9FF,0xE59338FF,0xEEDC2DFF,0xD8C762FF,0x3FE65CFF
};
```
Для начала, поместите этот массив в начале вашего скрипта.
Далее, поместите следующий код в коллбэк OnPlayerConnect:
```c
SetPlayerColor(playerid, PlayerColors[playerid % sizeof PlayerColors]);
```
Теперь [GetPlayerColor](../scripting/functions/GetPlayerColor) будет работать корректно!
Для новых версий SA-MP вы можете использовать массив:
```c
new PlayerRainbowColors[511] = {
/*OKStyle*/ 0x000022FF, 0x000044FF, 0x000066FF, 0x000088FF, 0x0000AAFF, 0x0000CCFF, 0x0000EEFF,
0x002200FF, 0x002222FF, 0x002244FF, 0x002266FF, 0x002288FF, 0x0022AAFF, 0x0022CCFF, 0x0022EEFF,
0x004400FF, 0x004422FF, 0x004444FF, 0x004466FF, 0x004488FF, 0x0044AAFF, 0x0044CCFF, 0x0044EEFF,
0x006600FF, 0x006622FF, 0x006644FF, 0x006666FF, 0x006688FF, 0x0066AAFF, 0x0066CCFF, 0x0066EEFF,
0x008800FF, 0x008822FF, 0x008844FF, 0x008866FF, 0x008888FF, 0x0088AAFF, 0x0088CCFF, 0x0088EEFF,
0x00AA00FF, 0x00AA22FF, 0x00AA44FF, 0x00AA66FF, 0x00AA88FF, 0x00AAAAFF, 0x00AACCFF, 0x00AAEEFF,
0x00CC00FF, 0x00CC22FF, 0x00CC44FF, 0x00CC66FF, 0x00CC88FF, 0x00CCAAFF, 0x00CCCCFF, 0x00CCEEFF,
0x00EE00FF, 0x00EE22FF, 0x00EE44FF, 0x00EE66FF, 0x00EE88FF, 0x00EEAAFF, 0x00EECCFF, 0x00EEEEFF,
0x220000FF, 0x220022FF, 0x220044FF, 0x220066FF, 0x220088FF, 0x2200AAFF, 0x2200CCFF, 0x2200FFFF,
0x222200FF, 0x222222FF, 0x222244FF, 0x222266FF, 0x222288FF, 0x2222AAFF, 0x2222CCFF, 0x2222EEFF,
0x224400FF, 0x224422FF, 0x224444FF, 0x224466FF, 0x224488FF, 0x2244AAFF, 0x2244CCFF, 0x2244EEFF,
0x226600FF, 0x226622FF, 0x226644FF, 0x226666FF, 0x226688FF, 0x2266AAFF, 0x2266CCFF, 0x2266EEFF,
0x228800FF, 0x228822FF, 0x228844FF, 0x228866FF, 0x228888FF, 0x2288AAFF, 0x2288CCFF, 0x2288EEFF,
0x22AA00FF, 0x22AA22FF, 0x22AA44FF, 0x22AA66FF, 0x22AA88FF, 0x22AAAAFF, 0x22AACCFF, 0x22AAEEFF,
0x22CC00FF, 0x22CC22FF, 0x22CC44FF, 0x22CC66FF, 0x22CC88FF, 0x22CCAAFF, 0x22CCCCFF, 0x22CCEEFF,
0x22EE00FF, 0x22EE22FF, 0x22EE44FF, 0x22EE66FF, 0x22EE88FF, 0x22EEAAFF, 0x22EECCFF, 0x22EEEEFF,
0x440000FF, 0x440022FF, 0x440044FF, 0x440066FF, 0x440088FF, 0x4400AAFF, 0x4400CCFF, 0x4400FFFF,
0x442200FF, 0x442222FF, 0x442244FF, 0x442266FF, 0x442288FF, 0x4422AAFF, 0x4422CCFF, 0x4422EEFF,
0x444400FF, 0x444422FF, 0x444444FF, 0x444466FF, 0x444488FF, 0x4444AAFF, 0x4444CCFF, 0x4444EEFF,
0x446600FF, 0x446622FF, 0x446644FF, 0x446666FF, 0x446688FF, 0x4466AAFF, 0x4466CCFF, 0x4466EEFF,
0x448800FF, 0x448822FF, 0x448844FF, 0x448866FF, 0x448888FF, 0x4488AAFF, 0x4488CCFF, 0x4488EEFF,
0x44AA00FF, 0x44AA22FF, 0x44AA44FF, 0x44AA66FF, 0x44AA88FF, 0x44AAAAFF, 0x44AACCFF, 0x44AAEEFF,
0x44CC00FF, 0x44CC22FF, 0x44CC44FF, 0x44CC66FF, 0x44CC88FF, 0x44CCAAFF, 0x44CCCCFF, 0x44CCEEFF,
0x44EE00FF, 0x44EE22FF, 0x44EE44FF, 0x44EE66FF, 0x44EE88FF, 0x44EEAAFF, 0x44EECCFF, 0x44EEEEFF,
0x660000FF, 0x660022FF, 0x660044FF, 0x660066FF, 0x660088FF, 0x6600AAFF, 0x6600CCFF, 0x6600FFFF,
0x662200FF, 0x662222FF, 0x662244FF, 0x662266FF, 0x662288FF, 0x6622AAFF, 0x6622CCFF, 0x6622EEFF,
0x664400FF, 0x664422FF, 0x664444FF, 0x664466FF, 0x664488FF, 0x6644AAFF, 0x6644CCFF, 0x6644EEFF,
0x666600FF, 0x666622FF, 0x666644FF, 0x666666FF, 0x666688FF, 0x6666AAFF, 0x6666CCFF, 0x6666EEFF,
0x668800FF, 0x668822FF, 0x668844FF, 0x668866FF, 0x668888FF, 0x6688AAFF, 0x6688CCFF, 0x6688EEFF,
0x66AA00FF, 0x66AA22FF, 0x66AA44FF, 0x66AA66FF, 0x66AA88FF, 0x66AAAAFF, 0x66AACCFF, 0x66AAEEFF,
0x66CC00FF, 0x66CC22FF, 0x66CC44FF, 0x66CC66FF, 0x66CC88FF, 0x66CCAAFF, 0x66CCCCFF, 0x66CCEEFF,
0x66EE00FF, 0x66EE22FF, 0x66EE44FF, 0x66EE66FF, 0x66EE88FF, 0x66EEAAFF, 0x66EECCFF, 0x66EEEEFF,
0x880000FF, 0x880022FF, 0x880044FF, 0x880066FF, 0x880088FF, 0x8800AAFF, 0x8800CCFF, 0x8800FFFF,
0x882200FF, 0x882222FF, 0x882244FF, 0x882266FF, 0x882288FF, 0x8822AAFF, 0x8822CCFF, 0x8822EEFF,
0x884400FF, 0x884422FF, 0x884444FF, 0x884466FF, 0x884488FF, 0x8844AAFF, 0x8844CCFF, 0x8844EEFF,
0x886600FF, 0x886622FF, 0x886644FF, 0x886666FF, 0x886688FF, 0x8866AAFF, 0x8866CCFF, 0x8866EEFF,
0x888800FF, 0x888822FF, 0x888844FF, 0x888866FF, 0x888888FF, 0x8888AAFF, 0x8888CCFF, 0x8888EEFF,
0x88AA00FF, 0x88AA22FF, 0x88AA44FF, 0x88AA66FF, 0x88AA88FF, 0x88AAAAFF, 0x88AACCFF, 0x88AAEEFF,
0x88CC00FF, 0x88CC22FF, 0x88CC44FF, 0x88CC66FF, 0x88CC88FF, 0x88CCAAFF, 0x88CCCCFF, 0x88CCEEFF,
0x88EE00FF, 0x88EE22FF, 0x88EE44FF, 0x88EE66FF, 0x88EE88FF, 0x88EEAAFF, 0x88EECCFF, 0x88EEEEFF,
0xAA0000FF, 0xAA0022FF, 0xAA0044FF, 0xAA0066FF, 0xAA0088FF, 0xAA00AAFF, 0xAA00CCFF, 0xAA00FFFF,
0xAA2200FF, 0xAA2222FF, 0xAA2244FF, 0xAA2266FF, 0xAA2288FF, 0xAA22AAFF, 0xAA22CCFF, 0xAA22EEFF,
0xAA4400FF, 0xAA4422FF, 0xAA4444FF, 0xAA4466FF, 0xAA4488FF, 0xAA44AAFF, 0xAA44CCFF, 0xAA44EEFF,
0xAA6600FF, 0xAA6622FF, 0xAA6644FF, 0xAA6666FF, 0xAA6688FF, 0xAA66AAFF, 0xAA66CCFF, 0xAA66EEFF,
0xAA8800FF, 0xAA8822FF, 0xAA8844FF, 0xAA8866FF, 0xAA8888FF, 0xAA88AAFF, 0xAA88CCFF, 0xAA88EEFF,
0xAAAA00FF, 0xAAAA22FF, 0xAAAA44FF, 0xAAAA66FF, 0xAAAA88FF, 0xAAAAAAFF, 0xAAAACCFF, 0xAAAAEEFF,
0xAACC00FF, 0xAACC22FF, 0xAACC44FF, 0xAACC66FF, 0xAACC88FF, 0xAACCAAFF, 0xAACCCCFF, 0xAACCEEFF,
0xAAEE00FF, 0xAAEE22FF, 0xAAEE44FF, 0xAAEE66FF, 0xAAEE88FF, 0xAAEEAAFF, 0xAAEECCFF, 0xAAEEEEFF,
0xCC0000FF, 0xCC0022FF, 0xCC0044FF, 0xCC0066FF, 0xCC0088FF, 0xCC00AAFF, 0xCC00CCFF, 0xCC00FFFF,
0xCC2200FF, 0xCC2222FF, 0xCC2244FF, 0xCC2266FF, 0xCC2288FF, 0xCC22AAFF, 0xCC22CCFF, 0xCC22EEFF,
0xCC4400FF, 0xCC4422FF, 0xCC4444FF, 0xCC4466FF, 0xCC4488FF, 0xCC44AAFF, 0xCC44CCFF, 0xCC44EEFF,
0xCC6600FF, 0xCC6622FF, 0xCC6644FF, 0xCC6666FF, 0xCC6688FF, 0xCC66AAFF, 0xCC66CCFF, 0xCC66EEFF,
0xCC8800FF, 0xCC8822FF, 0xCC8844FF, 0xCC8866FF, 0xCC8888FF, 0xCC88AAFF, 0xCC88CCFF, 0xCC88EEFF,
0xCCAA00FF, 0xCCAA22FF, 0xCCAA44FF, 0xCCAA66FF, 0xCCAA88FF, 0xCCAAAAFF, 0xCCAACCFF, 0xCCAAEEFF,
0xCCCC00FF, 0xCCCC22FF, 0xCCCC44FF, 0xCCCC66FF, 0xCCCC88FF, 0xCCCCAAFF, 0xCCCCCCFF, 0xCCCCEEFF,
0xCCEE00FF, 0xCCEE22FF, 0xCCEE44FF, 0xCCEE66FF, 0xCCEE88FF, 0xCCEEAAFF, 0xCCEECCFF, 0xCCEEEEFF,
0xEE0000FF, 0xEE0022FF, 0xEE0044FF, 0xEE0066FF, 0xEE0088FF, 0xEE00AAFF, 0xEE00CCFF, 0xEE00FFFF,
0xEE2200FF, 0xEE2222FF, 0xEE2244FF, 0xEE2266FF, 0xEE2288FF, 0xEE22AAFF, 0xEE22CCFF, 0xEE22EEFF,
0xEE4400FF, 0xEE4422FF, 0xEE4444FF, 0xEE4466FF, 0xEE4488FF, 0xEE44AAFF, 0xEE44CCFF, 0xEE44EEFF,
0xEE6600FF, 0xEE6622FF, 0xEE6644FF, 0xEE6666FF, 0xEE6688FF, 0xEE66AAFF, 0xEE66CCFF, 0xEE66EEFF,
0xEE8800FF, 0xEE8822FF, 0xEE8844FF, 0xEE8866FF, 0xEE8888FF, 0xEE88AAFF, 0xEE88CCFF, 0xEE88EEFF,
0xEEAA00FF, 0xEEAA22FF, 0xEEAA44FF, 0xEEAA66FF, 0xEEAA88FF, 0xEEAAAAFF, 0xEEAACCFF, 0xEEAAEEFF,
0xEECC00FF, 0xEECC22FF, 0xEECC44FF, 0xEECC66FF, 0xEECC88FF, 0xEECCAAFF, 0xEECCCCFF, 0xEECCEEFF,
0xEEEE00FF, 0xEEEE22FF, 0xEEEE44FF, 0xEEEE66FF, 0xEEEE88FF, 0xEEEEAAFF, 0xEEEECCFF, 0xEEEEEEFF
};
```
Теперь не будет одинаковых цветов никнеймов, все цвета распределены на максимальное количество слотов, шаг цвета - 34, а заполненный список игроков теперь будет выглядеть, как радуга!
| openmultiplayer/web/docs/translations/ru/tutorials/colorfix.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/ru/tutorials/colorfix.md",
"repo_id": "openmultiplayer",
"token_count": 5318
} | 420 |
---
title: Awesome
description: A curated list of useful tools, libraries and plugins for SA-MP development.
---
## Alati
- **[Community Compiler](https://github.com/pawn-lang/compiler/)** - Изразито ажурирана верзија компајлера, са многим поправкама и побољшањима.
- **[sampctl](http://sampctl.com/)** - Управитељ пакета за инсталацију "libraries" и покретанје вашег сервера.
- **[Plugin Runner](https://github.com/Zeex/samp-plugin-runner/)** - Алат за покретање лагане верзије послужитеља изравно са наредбом ретка (није потребан "server.cfg") за тестиранје плугина.
- **[Pawn Syntax - Sublime](https://packagecontrol.io/packages/Pawn%20syntax/)** - Pawn се самодовршава за "Sublime Text".
- **[Pawn Syntax - Visual Marketplace](https://marketplace.visualstudio.com/items?itemName=southclaws.vscode-pawn/)** - Pawn се самодовршава за "Visual Studio Code".
- **[SA-MP Zone Editor](https://bitbucket.org/Grimrandomer/samp-zone-editor/downloads/)** - "Zone Editor" за израду подручија и осталог.
- **[SA-MP Map Editor](https://github.com/openmultiplayer/archive/raw/master/tools/Map%20Editor.zip)** - Популарни "Map Editor" за SA:MP.
## Libraries
- **[SA:MP stdlib](https://github.com/pawn-lang/samp-stdlib/)** - Ажуриране верзије заданих "include" `const`-исправно, документовано, и довршено,
- **[fixes.inc](https://github.com/pawn-lang/sa-mp-fixes/)** - Изузетно оптимизовани поправци за велики број програмских погрешака SA:MP. Уклјучујући и играј.
- **[YSI](https://github.com/pawn-lang/YSI-Includes/)** - Најстарији, највећи и највише тестирани, добро подржани "libary" ѕа SAMP/pawn који нуди огроман број нових значајки игре и језика.
- **[amx_assembly](https://github.com/Zeex/amx_assembly/)** - Приступ ниске разине самој заложној скрипти.
- **[indirection](https://github.com/Y-Less/indirection/)** - Сустав за неизравно прослеђивање показивача и позиванје функција, са апстрактним методама за прилагодбу позива.
- **[code-parse.inc](https://github.com/Y-Less/code-parse.inc/)** - Анализирајте и прилагодите заложни код у време компајловања.
- **[strlib.inc](https://github.com/oscar-broman/strlib/)** - "String" функције у SA:MP.
- **[extended-vehicle-information.inc](https://github.com/Vince0789/sa-mp-extended-vehicle-information/)** - Велике количине заставица возила из једног играча у "SQLite" базу података.
- **[geo-ip.inc](https://github.com/Southclaws/SAMP-geoip/)** - Географска информација базирана на вашој "IP" адреси.
- **[samp-aviation](https://github.com/Southclaws/samp-aviation/)** - Аутопилот у SA:MP.
- **[progress2.inc](https://github.com/Southclaws/progress2/)** - Прикажи време, "health", гориво возила као прогресиван бар.
- **[weapon-data.inc](https://github.com/Southclaws/samp-weapon-dat/)** - Фино подешени, прилагодљиви подаци о оружију.
- **[MV_Youtube.inc](https://github.com/MichaelBelgium/MV_Youtube)** - "Youtube конвертер "API" за "Audio Stream".
## Командни Процесори
- **[izcmd.inc](https://github.com/YashasSamaga/I-ZCMD/)** - Побољшана верзија "ZCMD".
- **[PawnCMD.inc](https://github.com/katursis/Pawn.CMD/)** - Бржи од било којег другог командног процесора.
## Плугини
- **[crashdetect](https://github.com/Zeex/samp-plugin-crashdetect/)** - Развојни алат за проналажење багова током тестирања.
- **[JIT](https://github.com/Zeex/samp-plugin-jit/)** - Након што је ваш код стабилан, употревите га да бисте га знатно убрзали.
- **[sscanf](https://github.com/Y-Less/sscanf/)** - Претвори низове у више вредности, "intove", плутајуће, "player" итд.
- **[MySQL](https://github.com/pBlueG/SA-MP-MySQL/)** - Конектујте свој сервер са MySQL сервером.
- **[streamer](https://github.com/samp-incognito/samp-streamer-plugin/)** - Заобиђите многа SA:MP ограничења, попут предмета и преузимања.
- **[nativechecker](https://github.com/openmultiplayer/archive/raw/master/plugins/nativechecker.zip)** - Провера изворних кад се послужитељ покрене.
- **[Discord Connector](https://github.com/maddinat0r/samp-discord-connector)** - Лако стварање бота у оввиру скрипти.
## Крипто Плугини
- **[whirlpool](https://github.com/Southclaws/samp-whirlpool/)** - "Whirlpool" криптографски додатак за SA:MP.
- **[bcrypt](https://github.com/LassiR/bcrypt-samp/)** - "Bcrypt" криптографски додатак за SA:MP.
- **[SHA512](https://github.com/openmultiplayer/archive/raw/master/plugins/SHA512.zip)** - "SHA512" криптографски додатак за SA:MP.
## Гаме Мдови
- **[Example Gamemode](https://github.com/openmultiplayer/example-gamemodes)** - Листа гамемодова који су компатибилни са open.mp.
- **[ScavengeSurvive](https://github.com/Southclaws/ScavengeSurvive)** - Заснован на PvP преживљању.
| openmultiplayer/web/docs/translations/sr/awesome.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/sr/awesome.md",
"repo_id": "openmultiplayer",
"token_count": 2993
} | 421 |
---
title: IsPlayerNPC
description: Provera da li je igrac pravi igrac ili NPC.
tags: ["player", "npc"]
---
## Description
Provera da li je igrac pravi igrac ili NPC.
| Name | Description |
| -------- | --------------------------- |
| playerid | ID igraca koji se proverava |
## Returns
1: Igrac je NPC.
0: Igrac nije NPC.
## Examples
```c
public OnPlayerConnect(playerid)
{
if (IsPlayerNPC(playerid))
{
SendClientMessageToAll(-1, "An NPC connected!");
return 1;
}
// The other code here won't be executed unless its a player
}
```
## Related Functions
- [ConnectNPC](ConnectNPC.md): Konektuje NPC-a.
- [IsPlayerAdmin](IsPlayerAdmin.md): Proverava da li je igrac povezan na RCON.
| openmultiplayer/web/docs/translations/sr/scripting/functions/IsPlayerNPC.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/sr/scripting/functions/IsPlayerNPC.md",
"repo_id": "openmultiplayer",
"token_count": 301
} | 422 |
---
title: OnObjectMoved
description: Callback นี้ถูกเรียกเมื่อวัตถุถูกย้ายหลังจาก MoveObject (เมื่อมันหยุดเคลื่อนย้าย)
tags: []
---
## คำอธิบาย
Callback นี้ถูกเรียกเมื่อวัตถุถูกย้ายหลังจาก MoveObject (เมื่อมันหยุดเคลื่อนย้าย)
| ชื่อ | คำอธิบาย |
| -------- | ------------------- |
| objectid | ไอดีวัตถุที่ถูกย้าย |
## ส่งคืน
มันถูกเรียกในฟิลเตอร์สคริปต์ก่อนเสมอ
## ตัวอย่าง
```c
public OnObjectMoved(objectid)
{
printf("วัตถุ %d ถูกย้ายสำเร็จแล้ว", objectid);
return 1;
}
```
## บันทึก
:::tip
SetObjectPos จะไม่ทำงานถ้าใช้ใน Callback นี้ วิธีแก้ให้สร้างวัตถุขึ้นใหม่
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- [MoveObject](../../scripting/functions/MoveObject.md): เคลื่อนย้ายวัตถุ
- [MovePlayerObject](../../scripting/functions/MovePlayerObject.md): เคลื่อนย้ายวัตถุผู้เล่น
- [IsObjectMoving](../../scripting/functions/IsObjectMoving.md): ตรวจสอบว่าวัตถุกำลังเคลื่อนที่หรือไม่
- [StopObject](../../scripting/functions/StopObject.md): หยุดวัตถุไม่ให้เคลื่อนที่
- [OnPlayerObjectMoved](../../scripting/callbacks/OnPlayerObjectMoved.md): ถูกเรียกเมื่อวัตถุผู้เล่นหยุดเคลื่อนที่
| openmultiplayer/web/docs/translations/th/scripting/callbacks/OnObjectMoved.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/callbacks/OnObjectMoved.md",
"repo_id": "openmultiplayer",
"token_count": 1157
} | 423 |
---
title: OnPlayerFinishedDownloading
description: This callback is called when a player finishes downloading custom models.
tags: ["player"]
---
:::warning
Callback นี้ถูกเพิ่มใน SA-MP 0.3.DL R1 และจะไม่ทำงานในเวอร์ชั่นก่อนหน้านี้!
:::
## คำอธิบาย
This callback is called when a player finishes downloading custom models. For more information on how to add custom models to your server, see the release thread and this tutorial.
| Name | Description |
| ------------ | ------------------------------------------------------------------------------ |
| playerid | The ID of the player that finished downloading custom models. |
| virtualworld | The ID of the virtual world the player finished downloading custom models for. |
## ส่งคืน
Callback นี้ไม่มีการส่งค่ากลับ
## ตัวอย่าง
```c
public OnPlayerFinishedDownloading(playerid, virtualworld)
{
SendClientMessage(playerid, 0xffffffff, "Downloads finished.");
return 1;
}
```
## บันทึก
:::tip
This callback is called every time a player changes virtual worlds, even if there are no custom models present in that world.
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
| openmultiplayer/web/docs/translations/th/scripting/callbacks/OnPlayerFinishedDownloading.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/callbacks/OnPlayerFinishedDownloading.md",
"repo_id": "openmultiplayer",
"token_count": 601
} | 424 |
---
title: OnPlayerStreamIn
description: This callback is called when a player is streamed by some other player's client.
tags: ["player"]
---
## คำอธิบาย
This callback is called when a player is streamed by some other player's client.
| Name | Description |
| ----------- | ------------------------------------------------------- |
| playerid | The ID of the player who has been streamed. |
| forplayerid | The ID of the player that streamed the other player in. |
## ส่งคืน
มันถูกเรียกในฟิลเตอร์สคริปต์ก่อนเสมอ
## ตัวอย่าง
```c
public OnPlayerStreamIn(playerid, forplayerid)
{
new string[40];
format(string, sizeof(string), "Player %d is now streamed in for you.", playerid);
SendClientMessage(forplayerid, 0xFFFFFFFF, string);
return 1;
}
```
## บันทึก
:::tip
NPC สามารถเรียก Callback นี้ได้
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
| openmultiplayer/web/docs/translations/th/scripting/callbacks/OnPlayerStreamIn.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/callbacks/OnPlayerStreamIn.md",
"repo_id": "openmultiplayer",
"token_count": 509
} | 425 |
---
title: OnVehicleSirenStateChange
description: This callback is called when a vehicle's siren is toggled.
tags: ["vehicle"]
---
:::warning
Callback นี้ถูกเพิ่มใน SA-MP 0.3.7 และจะไม่ทำงานในเวอร์ชั่นก่อนหน้านี้!
:::
## คำอธิบาย
This callback is called when a vehicle's siren is toggled.
| Name | Description |
| --------- | --------------------------------------------------------- |
| playerid | The ID of the player that toggled the siren (driver). |
| vehicleid | The ID of the vehicle of which the siren was toggled for. |
| newstate | 0 if siren was turned off, 1 if siren was turned on. |
## ส่งคืน
1 - Will prevent gamemode from receiving this callback.
0 - Indicates that this callback will be passed to the gamemode.
มันถูกเรียกในฟิลเตอร์สคริปต์ก่อนเสมอ
## ตัวอย่าง
```c
public OnVehicleSirenStateChange(playerid, vehicleid, newstate)
{
if (newstate)
{
GameTextForPlayer(playerid, "~W~Siren ~G~on", 1000, 3);
}
else
{
GameTextForPlayer(playerid, "~W~Siren ~r~off", 1000, 3);
}
return 1;
}
```
## บันทึก
:::tip
This callback is only called when a vehicle's siren is toggled on or off, NOT when the alternate siren is in use (holding horn).
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- [GetVehicleParamsSirenState](../../scripting/functions/GetVehicleParamsSirenState.md): Check whether a vehicle's siren is on or off.
| openmultiplayer/web/docs/translations/th/scripting/callbacks/OnVehicleSirenStateChange.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/callbacks/OnVehicleSirenStateChange.md",
"repo_id": "openmultiplayer",
"token_count": 770
} | 426 |
---
title: AllowPlayerTeleport
description: Enable/Disable the teleporting ability for a player by right-clicking on the map.
tags: ["player"]
---
:::warning
This function, as of 0.3d, is deprecated. Check OnPlayerClickMap.
:::
## คำอธิบาย
Enable/Disable the teleporting ability for a player by right-clicking on the map
| Name | Description |
| -------- | --------------------------------------- |
| playerid | The ID of the player to allow teleport. |
| allow | 1-allow, 0-disallow |
## ส่งคืน
This function does not return any specific values.
## ตัวอย่าง
```c
public OnPlayerConnect( playerid )
{
// Allows the Player to teleport by right-clicking on the map
// since this is in OnPlayerConnect, this will be done for EACH player
AllowPlayerTeleport( playerid, 1 );
}
```
## บันทึก
:::warning
This function will work only if AllowAdminTeleport is enabled, and you have to be an admin.
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- [AllowAdminTeleport](../../scripting/functions/AllowAdminTeleport.md): Toggle waypoint teleporting for RCON admins.
| openmultiplayer/web/docs/translations/th/scripting/functions/AllowPlayerTeleport.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/AllowPlayerTeleport.md",
"repo_id": "openmultiplayer",
"token_count": 463
} | 427 |
---
title: CallLocalFunction
description: Calls a public function from the script in which it is used.
tags: []
---
## คำอธิบาย
Calls a public function from the script in which it is used.
| Name | Description |
| -------------- | ------------------------------------------- |
| function[] | Public function's name. |
| format[] | Tag/format of each variable |
| {Float,\_}:... | 'Indefinite' number of arguments of any tag |
## ส่งคืน
If the function exists, returns the same as the called function. If the function does not exist, returns 0.
## ตัวอย่าง
```c
forward publicFunc(number, Float:flt, const string[]);
public publicFunc(number, Float:flt, const string[])
{
printf("Received integer %i, float %f, string %s", number, flt, string);
return 1;
}
CallLocalFunction("publicFunc", "ifs", 420, 68.999999999, "Hello world");
```
## บันทึก
:::warning
CallLocalFunction crashes the server if it's passing an empty string.
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- [CallRemoteFunction](../../scripting/functions/CallRemoteFunction.md): Call a function in any loaded script.
| openmultiplayer/web/docs/translations/th/scripting/functions/CallLocalFunction.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/CallLocalFunction.md",
"repo_id": "openmultiplayer",
"token_count": 506
} | 428 |
---
title: CreatePlayer3DTextLabel
description: Creates a 3D Text Label only for a specific player.
tags: ["player", "3dtextlabel"]
---
## คำอธิบาย
Creates a 3D Text Label only for a specific player
| Name | Description |
| --------------- | ------------------------------------------------------------------------------- |
| playerid | The player which should see the newly created 3DText Label. |
| text[] | The text to display. |
| color | The text color |
| x | X Coordinate (or offset if attached) |
| y | Y Coordinate (or offset if attached) |
| z | Z Coordinate (or offset if attached) |
| DrawDistance | The distance where you are able to see the 3D Text Label |
| attachedplayer | The player you want to attach the 3D Text Label to. (None: INVALID_PLAYER_ID) |
| attachedvehicle | The vehicle you want to attach the 3D Text Label to. (None: INVALID_VEHICLE_ID) |
| testLOS | 0/1 Test the line-of-sight so this text can't be seen through walls |
## ส่งคืน
The ID of the newly created Player 3D Text Label, or INVALID_3DTEXT_ID if the Player 3D Text Label limit (MAX_3DTEXT_PLAYER) was reached.
## ตัวอย่าง
```c
if (strcmp(cmd, "/playerlabel", true) == 0)
{
new PlayerText3D:playertextid;
new Float:X, Float:Y, Float:Z;
GetPlayerPos( playerid, X, Y, Z );
playertextid = CreatePlayer3DTextLabel(playerid,"Hello\nI'm at your position",0x008080FF,X,Y,Z,40.0);
return 1;
}
```
## บันทึก
:::tip
drawdistance seems to be a lot smaller when spectating.
:::
:::warning
If text[] is empty, the server/clients next to the text might crash!
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- [Create3DTextLabel](../../scripting/functions/Create3DTextLabel.md): Create a 3D text label.
- [Delete3DTextLabel](../../scripting/functions/Delete3DTextLabel.md): Delete a 3D text label.
- [Attach3DTextLabelToPlayer](../../scripting/functions/Attach3DTextLabelToPlayer.md): Attach a 3D text label to a player.
- [Attach3DTextLabelToVehicle](../../scripting/functions/Attach3DTextLabelToVehicle.md): Attach a 3D text label to a vehicle.
- [Update3DTextLabelText](../../scripting/functions/Update3DTextLabelText.md): Change the text of a 3D text label.
- [DeletePlayer3DTextLabel](../../scripting/functions/DeletePlayer3DTextLabel.md): Delete a player's 3D text label.
- [UpdatePlayer3DTextLabelText](../../scripting/functions/UpdatePlayer3DTextLabelText.md): Change the text of a player's 3D text label.
| openmultiplayer/web/docs/translations/th/scripting/functions/CreatePlayer3DTextLabel.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/CreatePlayer3DTextLabel.md",
"repo_id": "openmultiplayer",
"token_count": 1339
} | 429 |
---
title: DisableMenu
description: Disable a menu.
tags: ["menu"]
---
## คำอธิบาย
Disable a menu.
| Name | Description |
| ----------- | ------------------------------ |
| Menu:menuid | The ID of the menu to disable. |
## ส่งคืน
This function does not return any specific values.
## ตัวอย่าง
```c
new WeaponMenu;
WeaponMenu = CreateMenu("Weapons", 1, 50.0, 180.0, 200.0, 200.0);
AddMenuItem(WeaponMenu, 0, "Rocket Launcher");
AddMenuItem(WeaponMenu, 0, "Flamethrower");
AddMenuItem(WeaponMenu, 0, "Minigun");
AddMenuItem(WeaponMenu, 0, "Grenades");
// Under OnPlayerCommandText
if (!strcmp(cmdtext, "/disableguns", true))
{
DisableMenu(WeaponMenu); //Disable the weapon menu
return 1;
}
```
## บันทึก
:::tip
Crashes when passed an invalid menu ID.
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- [CreateMenu](../../scripting/functions/CreateMenu.md): Create a menu.
- [DestroyMenu](../../scripting/functions/DestroyMenu.md): Destroy a menu.
- [AddMenuItem](../../scripting/functions/AddMenuItem.md): Add an item to a menu.
| openmultiplayer/web/docs/translations/th/scripting/functions/DisableMenu.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/DisableMenu.md",
"repo_id": "openmultiplayer",
"token_count": 466
} | 430 |
---
title: GetActorHealth
description: Get the health of an actor.
tags: []
---
:::warning
ฟังก์ชั่นนี้ถูกเพิ่มใน SA-MP 0.3.7 และจะไม่ทำงานในเวอร์ชั่นก่อนหน้านี้!
:::
## คำอธิบาย
Get the health of an actor.
| Name | Description |
| ------------- | ------------------------------------------------------------------------------- |
| actorid | The ID of the actor to get the health of. |
| &Float:health | A float variable, passed by reference, in to which to store the actor's health. |
## ส่งคืน
1 - success
0 - failure (i.e. actor is not created).
NOTE: The actor's health is stored in the specified variable, not in the return value.
## ตัวอย่าง
```c
new MyActor;
public OnGameModeInit()
{
MyActor = CreateActor(179, 316.1, -134.0, 999.6, 90.0); // Actor as salesperson in Ammunation
SetActorHealth(MyActor, 100);
new Float:actorHealth;
GetActorHealth(MyActor, actorHealth);
printf("Actor ID %d has %.2f health.", MyActor, actorHealth);
return 1;
}
```
## ฟังก์ชั่นที่เกี่ยวข้องกัน
| openmultiplayer/web/docs/translations/th/scripting/functions/GetActorHealth.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/GetActorHealth.md",
"repo_id": "openmultiplayer",
"token_count": 628
} | 431 |
---
title: GetPVarInt
description: Gets an integer player variable's value.
tags: ["pvar"]
---
## คำอธิบาย
Gets an integer player variable's value.
| Name | Description |
| -------- | --------------------------------------------------------------------------- |
| playerid | The ID of the player whose player variable to get. |
| varname | The name of the player variable (case-insensitive). Assigned in SetPVarInt. |
## ส่งคืน
The integer value of the specified player variable. It will still return 0 if the variable is not set, or the player does not exist.
## ตัวอย่าง
```c
public OnPlayerDisconnect(playerid,reason)
{
printf("money: %d", GetPVarInt(playerid, "money")); // get the saved value ('money')
// will print 'money: amount'
return 1;
}
```
## บันทึก
:::tip
Variables aren't reset until after OnPlayerDisconnect is called, so the values are still accessible in OnPlayerDisconnect.
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- SetPVarInt: Set an integer for a player variable.
- SetPVarString: Set a string for a player variable.
- GetPVarString: Get the previously set string from a player variable.
- SetPVarFloat: Set a float for a player variable.
- GetPVarFloat: Get the previously set float from a player variable.
- DeletePVar: Delete a player variable.
| openmultiplayer/web/docs/translations/th/scripting/functions/GetPVarInt.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/GetPVarInt.md",
"repo_id": "openmultiplayer",
"token_count": 549
} | 432 |
---
title: GetPlayerCameraTargetVehicle
description: Get the ID of the vehicle the player is looking at.
tags: ["player", "vehicle"]
---
:::warning
ฟังก์ชั่นนี้ถูกเพิ่มใน SA-MP 0.3.7 และจะไม่ทำงานในเวอร์ชั่นก่อนหน้านี้!
:::
## คำอธิบาย
Get the ID of the vehicle the player is looking at.
| Name | Description |
| -------- | ------------------------------ |
| playerid | The ID of the player to check. |
## ส่งคืน
The vehicle ID of the vehicle the player is looking at. INVALID_VEHICLE_ID if none.
## ตัวอย่าง
```c
new globalVehicleID;
public OnGameModeInit()
{
globalVehicleID = CreateVehicle(596, 0, 0, 3, 0, 0, 0, -1, -1, -1);
return 1;
}
public OnPlayerConnect(playerid)
{
EnablePlayerCameraTarget(playerid, true);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp(cmdtext, "/check", true))
{
new vehicleid = GetPlayerCameraTargetVehicle(playerid);
if (vehicleid == globalVehicleID)
{
SendClientMessage(playerid, -1, "You're looking at your vehicle!");
}
else
{
SendClientMessage(playerid, -1, "You're not looking at your vehicle.");
}
return 1;
}
return 0;
}
```
## บันทึก
:::tip
This function can (obviously) only return one vehicle ID at a time, while the player may be looking at multiple. It generally seems to detect the closest vehicle first.
:::
:::warning
This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player.
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- [GetPlayerCameraTargetPlayer](../functions/GetPlayerCameraTargetPlayer): Get the ID of the player a player is looking at.
- [GetPlayerCameraTargetObject](../functions/GetplayerCameraTargetObject): Get the ID of the object a player is looking at.
- [EnablePlayerCameraTarget](../functions/EnablePlayerCameraTarget): Enable player camera targetting functions.
- [GetPlayerCameraFrontVector](../functions/GetPlayercameraFrontVector): Get the player's camera fron
| openmultiplayer/web/docs/translations/th/scripting/functions/GetPlayerCameraTargetVehicle.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/GetPlayerCameraTargetVehicle.md",
"repo_id": "openmultiplayer",
"token_count": 900
} | 433 |
---
title: GetPlayerMoney
description: Retrieves the amount of money a player has.
tags: ["player"]
---
## คำอธิบาย
Retrieves the amount of money a player has.
| Name | Description |
| -------- | ----------------------------------------- |
| playerid | The ID of the player to get the money of. |
## ส่งคืน
The amount of money the player has.
## ตัวอย่าง
```c
public OnPlayerSpawn(playerid)
{
new string[32];
format(string, sizeof(string), "Your money: $%i.", GetPlayerMoney(playerid));
SendClientMessage(playerid, 0xFFFFFFAA, string);
}
```
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- GivePlayerMoney: Give a player money.
- ResetPlayerMoney: Set the money of a player to \$0.
| openmultiplayer/web/docs/translations/th/scripting/functions/GetPlayerMoney.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/GetPlayerMoney.md",
"repo_id": "openmultiplayer",
"token_count": 330
} | 434 |
---
title: GetPlayerTargetPlayer
description: Check who a player is aiming at.
tags: ["player"]
---
## คำอธิบาย
Check who a player is aiming at.
| Name | Description |
| -------- | ------------------------------------------ |
| playerid | The ID of the player to get the target of. |
## ส่งคืน
The ID of the target player, or INVALID_PLAYER_ID if none.
## ตัวอย่าง
```c
public OnPlayerUpdate(playerid)
{
// Store the ID
new targetplayer = GetPlayerTargetPlayer(playerid);
if (GetPlayerTeam(targetplayer) == GetPlayerTeam(playerid) && targetplayer != INVALID_PLAYER_ID)
{
GameTextForPlayer(playerid, "~R~do not shoot at team-mates!", 5000, 3);
}
}
```
## บันทึก
:::warning
Does not work for joypads/controllers, and after a certain distance. Does not work for the sniper rifle, as it doesn't lock on to anything and as such can't and won't return a player.
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- GetPlayerCameraFrontVector: Get the player's camera front vector
- OnPlayerGiveDamage: This callback is called when a player gives damage.
- OnPlayerTakeDamage: This callback is called when a player takes damage.
| openmultiplayer/web/docs/translations/th/scripting/functions/GetPlayerTargetPlayer.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/GetPlayerTargetPlayer.md",
"repo_id": "openmultiplayer",
"token_count": 478
} | 435 |
---
title: GetSVarType
description: Gets the type (integer, float or string) of a server variable.
tags: []
---
## คำอธิบาย
Gets the type (integer, float or string) of a server variable.
| Name | Description |
| ------- | --------------------------------------------------- |
| varname | The name of the server variable to get the type of. |
## ส่งคืน
Returns the type of the SVar. See table below.
## ตัวอย่าง
```c
stock PrintSVar(varname[])
{
switch(GetSVarType(varname))
{
case SERVER_VARTYPE_NONE:
{
return 0;
}
case SERVER_VARTYPE_INT:
{
printf("Integer SVar '%s': %i", varname, GetSVarInt(varname));
}
case SERVER_VARTYPE_FLOAT:
{
printf("Float SVar '%s': %f", varname, GetSVarFloat(varname));
}
case SERVER_VARTYPE_STRING:
{
new varstring[256];
GetSVarString(varname, varstring);
printf("String SVar '%s': %s", varname, varstring);
}
}
return 1;
}
```
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- SetSVarInt: Set an integer for a server variable.
- GetSVarInt: Get a player server as an integer.
- SetSVarString: Set a string for a server variable.
- GetSVarString: Get the previously set string from a server variable.
- SetSVarFloat: Set a float for a server variable.
- GetSVarFloat: Get the previously set float from a server variable.
- DeleteSVar: Delete a server variable.
| openmultiplayer/web/docs/translations/th/scripting/functions/GetSVarType.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/GetSVarType.md",
"repo_id": "openmultiplayer",
"token_count": 723
} | 436 |
---
title: GetVehicleParamsEx
description: Gets a vehicle's parameters.
tags: ["vehicle"]
---
## คำอธิบาย
Gets a vehicle's parameters.
| Name | Description |
| ---------- | ------------------------------------------------------------------- |
| vehicleid | The ID of the vehicle to get the parameters from. |
| &engine | Get the engine status. If 1, the engine is running.. |
| &lights | Get the vehicle's lights' state. If 1 the lights are on. |
| &alarm | Get the vehicle's alarm state. If 1 the alarm is (or was) sounding. |
| &doors | Get the lock status of the doors. If 1 the doors are locked. |
| &bonnet | Get the bonnet/hood status. If 1, it's open. |
| &boot | Get the boot/trunk status. 1 means it is open. |
| &objective | Get the objective status. 1 means the objective is on. |
## ส่งคืน
1 - success
0 - failure (invalid vehicle ID).
The vehicle's parameters are stored in the referenced variables, not in the return value.
## ตัวอย่าง
```c
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
//This would cause all the variable above, to become the status of its subject.
```
## บันทึก
:::tip
If a parameter is unset (SetVehicleParamsEx not used beforehand) the value will be -1 ('unset').
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- SetVehicleParamsEx: Sets a vehicle's params for all players.
| openmultiplayer/web/docs/translations/th/scripting/functions/GetVehicleParamsEx.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/GetVehicleParamsEx.md",
"repo_id": "openmultiplayer",
"token_count": 698
} | 437 |
---
title: IsActorInvulnerable
description: Check if an actor is invulnerable.
tags: []
---
:::warning
ฟังก์ชั่นนี้ถูกเพิ่มใน SA-MP 0.3.7 และจะไม่ทำงานในเวอร์ชั่นก่อนหน้านี้!
:::
## คำอธิบาย
Check if an actor is invulnerable.
| Name | Description |
| ------- | ----------------------------- |
| actorid | The ID of the actor to check. |
## ส่งคืน
1: The actor is invulnerable.
0: The actor is vulnerable.
## ตัวอย่าง
```c
new MyActor;
public OnGameModeInit()
{
MyActor = CreateActor(179, 316.1, -134.0, 999.6, 90.0); // Actor as a salesperson in Ammunation.
if (IsActorInvulnerable(MyActor))
{
print("Actor is invulnerable.");
}
else
{
print("Actor is vulnerable.");
}
return 1;
}
```
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- [CreateActor](../../scripting/functions/CreateActor.md): Create an actor (static NPC).
- [SetActorInvulnerable](../../scripting/functions/SetActorInvulnerable.md): Set actor invulnerable.
- [SetActorHealth](../../scripting/functions/SetActorHealth.md): Set the health of an actor.
| openmultiplayer/web/docs/translations/th/scripting/functions/IsActorInvulnerable.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/IsActorInvulnerable.md",
"repo_id": "openmultiplayer",
"token_count": 574
} | 438 |
---
title: IsValidMenu
description: Checks if a menu ID is valid.
tags: []
---
## คำอธิบาย
Checks if a menu ID is valid.
| Name | Description |
| ------ | ---------------------------- |
| menuid | The ID of the menu to check. |
## ส่งคืน
1 - The menu is valid.
0 - The menu is not valid.
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- [CreateMenu](../../scripting/functions/CreateMenu.md): Creates a menu.
- [DestroyMenu](../../scripting/functions/DestroyMenu.md): Destroys the specified menu.
- [DisableMenu](../../scripting/functions/DisableMenu.md): Disable a menu.
- [DisableMenuRow](../../scripting/functions/DisableMenuRow.md): Disable a specific row in a menu for all players.
- [AddMenuItem](../../scripting/functions/AddMenuItem.md): Adds an item to a specified menu.
- [SetMenuColumnHeader](../../scripting/functions/SetMenuColumnHeader.md): Set the header for one of the columns in a menu.
- [OnPlayerSelectedMenuRow](../../scripting/callbacks/OnPlayerSelectedMenuRow.md): Called when a player selected a row in a menu.
- [OnPlayerExitedMenu](../../scripting/callbacks/OnPlayerExitedMenu.md): Called when a player exits a menu.
| openmultiplayer/web/docs/translations/th/scripting/functions/IsValidMenu.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/IsValidMenu.md",
"repo_id": "openmultiplayer",
"token_count": 433
} | 439 |
---
title: NetStats_GetIpPort
description: Get a player's IP and port.
tags: []
---
## คำอธิบาย
Get a player's IP and port.
| Name | Description |
| ----------- | ---------------------------------------------------------------- |
| playerid | The ID of the player to get the IP and port of. |
| ip_port[] | A string array to store the IP and port in, passed by reference. |
| ip_port_len | The maximum length of the IP/port. 22 is recommended. |
## ส่งคืน
The player's IP and port is stored in the specified array.
## ตัวอย่าง
```c
public OnPlayerCommandText(playerid,cmdtext[])
{
if (!strcmp(cmdtext, "/ipandport"))
{
new dest[22];
NetStats_GetIpPort(playerid, dest, sizeof(dest));
new szString[144];
format(szString, sizeof(szString), "Your current IP and port: %s.", dest);
SendClientMessage(playerid, -1, szString);
}
return 1;
}
```
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- [GetPlayerIp](../functions/GetPlayerIp.md): Get a player's IP.
- [GetPlayerNetworkStats](../functions/GetPlayerNetworkStats.md): Gets a player networkstats and saves it into a string.
- [GetNetworkStats](../functions/GetNetworkStats.md): Gets the servers networkstats and saves it into a string.
- [NetStats_GetConnectedTime](../functions/NetStats_GetConnectedTime.md): Get the time that a player has been connected for.
- [NetStats_MessagesReceived](../functions/NetStats_MessagesReceived.md): Get the number of network messages the server has received from the player.
- [NetStats_BytesReceived](../functions/NetStats_BytesReceived.md): Get the amount of information (in bytes) that the server has received from the player.
- [NetStats_MessagesSent](../functions/NetStats_MessagesSent.md): Get the number of network messages the server has sent to the player.
- [NetStats_BytesSent](../functions/NetStats_BytesSent.md): Get the amount of information (in bytes) that the server has sent to the player.
- [NetStats_MessagesRecvPerSecond](../functions/NetStats_MessagesRecvPerSecond.md): Get the number of network messages the server has received from the player in the last second.
- [NetStats_PacketLossPercent](../functions/NetStats_PacketLossPercent.md): Get a player's packet loss percent.
- [NetStats_ConnectionStatus](../functions/NetStats_ConnectionStatus.md): Get a player's connection status.
| openmultiplayer/web/docs/translations/th/scripting/functions/NetStats_GetIpPort.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/NetStats_GetIpPort.md",
"repo_id": "openmultiplayer",
"token_count": 890
} | 440 |
---
title: PlayerTextDrawHide
description: Hide a player-textdraw from the player it was created for.
tags: ["player", "textdraw", "playertextdraw"]
---
## คำอธิบาย
Hide a player-textdraw from the player it was created for
| Name | Description |
| -------- | --------------------------------------------- |
| playerid | The ID of the player to hide the textdraw for |
| text | The ID of the textdraw to hide |
## ส่งคืน
This function does not return any specific values.
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- PlayerTextDrawShow: Show a player-textdraw.
- CreatePlayerTextDraw: Create a player-textdraw.
- PlayerTextDrawDestroy: Destroy a player-textdraw.
- PlayerTextDrawColor: Set the color of the text in a player-textdraw.
- PlayerTextDrawBoxColor: Set the color of a player-textdraw's box.
- PlayerTextDrawBackgroundColor: Set the background color of a player-textdraw.
- PlayerTextDrawAlignment: Set the alignment of a player-textdraw.
- PlayerTextDrawFont: Set the font of a player-textdraw.
- PlayerTextDrawLetterSize: Set the letter size of the text in a player-textdraw.
- PlayerTextDrawTextSize: Set the size of a player-textdraw box (or clickable area for PlayerTextDrawSetSelectable).
- PlayerTextDrawSetOutline: Toggle the outline on a player-textdraw.
- PlayerTextDrawSetShadow: Set the shadow on a player-textdraw.
- PlayerTextDrawSetProportional: Scale the text spacing in a player-textdraw to a proportional ratio.
- PlayerTextDrawUseBox: Toggle the box on a player-textdraw.
- PlayerTextDrawSetString: Set the text of a player-textdraw.
| openmultiplayer/web/docs/translations/th/scripting/functions/PlayerTextDrawHide.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/PlayerTextDrawHide.md",
"repo_id": "openmultiplayer",
"token_count": 548
} | 441 |
---
title: RemovePlayerFromVehicle
description: Removes/ejects a player from their vehicle.
tags: ["player", "vehicle"]
---
## คำอธิบาย
Removes/ejects a player from their vehicle.
| Name | Description |
| -------- | -------------------------------------------------- |
| playerid | The ID of the player to remove from their vehicle. |
## ส่งคืน
1: The function was executed successfully.
0: The function failed to execute. This means the player is not connected.
## ตัวอย่าง
```c
// Example - Players can only drive vehicles if they have 10 score.
public OnPlayerStateChange(playerid, PLAYER_STATE:newstate, PLAYER_STATE:oldstate)
{
if (newstate == PLAYER_STATE_DRIVER && GetPlayerScore(playerid) < 10) // PlAYER_STATE_DRIVER = 2
{
RemovePlayerFromVehicle(playerid);
}
return 1;
}
```
## บันทึก
:::tip
The exiting animation is not synced for other players. This function will not work when used in OnPlayerEnterVehicle, because the player isn't in the vehicle when the callback is called. Use OnPlayerStateChange instead(see the example below). The player isn't removed if he is in a RC Vehicle.
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- [PutPlayerInVehicle](../functions/PutPlayerInVehicle.md): Put a player in a vehicle.
| openmultiplayer/web/docs/translations/th/scripting/functions/RemovePlayerFromVehicle.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/RemovePlayerFromVehicle.md",
"repo_id": "openmultiplayer",
"token_count": 509
} | 442 |
---
title: SetActorFacingAngle
description: Set the facing angle of an actor.
tags: []
---
:::warning
ฟังก์ชั่นนี้ถูกเพิ่มใน SA-MP 0.3.7 และจะไม่ทำงานในเวอร์ชั่นก่อนหน้านี้!
:::
## คำอธิบาย
Set the facing angle of an actor.
| Name | Description |
| ------- | ------------------------------------------------------------------------ |
| actorid | The ID of the actor to set the facing angle of. Returned by CreateActor. |
| ang | The facing angle to set for the actor. |
## ส่งคืน
1: The function was executed successfully.
0: The function failed to execute. The actor specified does not exist.
## ตัวอย่าง
```c
new MyActor;
public OnGameModeInit()
{
MyActor = CreateActor(...);
return 1;
}
// Somewhere else
SetActorFacingAngle(MyActor, 180.0);
```
## บันทึก
:::tip
When creating an actor with CreateActor, you specify it's facing angle. You do not need to use this function unless you want to change its facing angle later.
:::
:::warning
Players will see actor's facing angle changed only when it is restreamed to them.
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- GetActorFacingAngle: Get the facing angle of an actor.
- SetActorPos: Set the position of an actor.
| openmultiplayer/web/docs/translations/th/scripting/functions/SetActorFacingAngle.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/SetActorFacingAngle.md",
"repo_id": "openmultiplayer",
"token_count": 648
} | 443 |
---
title: SetObjectsDefaultCameraCol
description: Allows camera collisions with newly created objects to be disabled by default.
tags: []
---
:::warning
ฟังก์ชั่นนี้ถูกเพิ่มใน SA-MP 0.3.7 และจะไม่ทำงานในเวอร์ชั่นก่อนหน้านี้!
:::
## คำอธิบาย
Allows camera collisions with newly created objects to be disabled by default.
| Name | Description |
| ------- | --------------------------------------------------------------------------------------------------- |
| disable | 1 to disable camera collisions for newly created objects and 0 to enable them (enabled by default). |
## ส่งคืน
Note
This function only affects the camera collision of objects created AFTER its use - it does not toggle existing objects' camera collisions.
## ตัวอย่าง
```c
public OnGameModeInit()
{
// Disable camera collision
SetObjectsDefaultCameraCol(1);
// Create mapped objects
CreateObject(...);
CreateObject(...);
CreateObject(...);
CreateObject(...);
// The above objects will NOT have camera collisions
// Re-enable camera collisions
SetObjectsDefaultCameraCol(0);
// Create mapped objects
CreateObject(...);
CreateObject(...);
CreateObject(...);
CreateObject(...);
// The above objects WILL have camera collision
// BUT, the first set will still NOT have camera collisions
return 1;
}
```
## บันทึก
:::tip
This function only affects the camera collision of objects created AFTER its use - it does not toggle existing objects' camera collisions.
:::
:::warning
This function ONLY works outside the normal SA map boundaries (past 3000 units).
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- SetObjectNoCameraCol: Disables collisions between camera and object.
- SetPlayerObjectNoCameraCol: Disables collisions between camera and player object.
| openmultiplayer/web/docs/translations/th/scripting/functions/SetObjectsDefaultCameraCol.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/SetObjectsDefaultCameraCol.md",
"repo_id": "openmultiplayer",
"token_count": 763
} | 444 |
---
title: SetPlayerHealth
description: Set the health of a player.
tags: ["player"]
---
## คำอธิบาย
Set the health of a player.
| Name | Description |
| ------------ | ---------------------------------------------------------------------------------------------------------------------------- |
| playerid | The ID of the player to set the health of. |
| Float:health | The value to set the player's health to. Max health that can be displayed in the HUD is 100, though higher values are valid. |
## ส่งคืน
1: The function executed successfully.
0: The function failed to execute. This means the player specified does not exist.
## ตัวอย่าง
```c
//Sets the players health to full
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp("/heal", cmdtext, true))
{
SetPlayerHealth(playerid, 100.0);
return 1;
}
if (!strcmp("/kill", cmdtext, true))
{
SetPlayerHealth(playerid, 0.0);
return 1;
}
return 0;
}
```
## บันทึก
:::tip
If a player's health is set to 0 or a minus value, they will die instantly. If a player's health is below 10 or above 98303, their health bar will flash.
:::
:::warning
Health is obtained rounded to integers: set 50.15, but get 50.0
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- GetPlayerHealth: Find out how much health a player has.
- GetPlayerArmour: Find out how much armour a player has.
- SetPlayerArmour: Set the armour of a player.
| openmultiplayer/web/docs/translations/th/scripting/functions/SetPlayerHealth.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/SetPlayerHealth.md",
"repo_id": "openmultiplayer",
"token_count": 744
} | 445 |
---
title: SetPlayerSkillLevel
description: Set the skill level of a certain weapon type for a player.
tags: ["player"]
---
## คำอธิบาย
Set the skill level of a certain weapon type for a player.
| Name | Description |
| -------- | ---------------------------------------------------------------------------------------------------- |
| playerid | The ID of the player to set the weapon skill of. |
| skill | The [weapon](../resources/weaponskills.md) to set the skill of. |
| level | The skill level to set for that weapon, ranging from 0 to 999. A level out of range will max it out. |
## ส่งคืน
This function does not return any specific values.
## ตัวอย่าง
```c
public OnPlayerSpawn(playerid)
{
SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 1);
// This will make the player use single-handed sawn-off shotguns.
return 1;
}
```
## บันทึก
:::warning
The skill parameter is NOT the weapon ID, it is the skill type. Click here for a list of skill types.
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- SetPlayerArmedWeapon: Set a player's armed weapon.
- GivePlayerWeapon: Give a player a weapon.
| openmultiplayer/web/docs/translations/th/scripting/functions/SetPlayerSkillLevel.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/SetPlayerSkillLevel.md",
"repo_id": "openmultiplayer",
"token_count": 601
} | 446 |
---
title: SetTimerEx
description: Sets a timer to call a function after the specified interval.
tags: []
---
## คำอธิบาย
Sets a timer to call a function after the specified interval. This variant ('Ex') can pass parameters (such as a player ID) to the function.
| Name | Description |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| funcname[] | The name of a public function to call when the timer expires. |
| interval | Interval in milliseconds (1 second = 1000 MS). |
| repeating | Boolean (true/false (or 1/0)) that states whether the timer should be called repeatedly (can only be stopped with KillTimer) or only once. |
| format[] | Special format indicating the types of values the timer will pass. |
| {Float,\_}:... | Indefinite number of arguments to pass (must follow format specified in previous parameter). |
## ส่งคืน
The ID of the timer that was started. Timer IDs start at 1 and are never reused. There are no internal checks to verify that the parameters passed are valid (e.g. duration not a minus value). Y_Less' 'fixes2' plugin implements these checks and also vastly improves the accuracy of timers, and also adds support for array/string passing.
## ตัวอย่าง
```c
SetTimerEx("EndAntiSpawnKill", 5000, false, "i", playerid);
// EndAntiSpawnKill - The function that will be called
// 5000 - 5000 MS (5 seconds). This is the interval. The timer will be called after 5 seconds.
// false - Not repeating. Will only be called once.
// "i" - I stands for integer (whole number). We are passing an integer (a player ID) to the function.
// playerid - The value to pass. This is the integer specified in the previous parameter.
// The event callback (OnPlayerSpawn) - we will start a timer here
public OnPlayerSpawn(playerid)
{
// Anti-Spawnkill (5 seconds)
// Set their health very high so they can't be killed
SetPlayerHealth(playerid, 999999);
// Notify them
SendClientMessage(playerid, -1, "You are protected against spawn-killing for 5 seconds.");
// Start a 5 second timer to end the anti-spawnkill
SetTimerEx("EndAntiSpawnKill", 5000, false, "i", playerid);
}
// Forward (make public) the function so the server can 'see' it
forward EndAntiSpawnKill(playerid);
// The timer function - the code to be executed when the timer is called goes here
public EndAntiSpawnKill(playerid)
{
// 5 seconds has passed, so let's set their health back to 100
SetPlayerHealth(playerid, 100);
// Let's notify them also
SendClientMessage(playerid, -1, "You are no longer protected against spawn-killing.");
return 1;
}
```
## บันทึก
:::tip
Timer ID variables should be initialized to -1 when they can to minimise the chance of accidentally killing timer ID 0 by mistake (or use timer ID 0 up at the start of OnGameModeInit). Timer intervals are not accurate (roughly 25% off). There are fixes available here and here. The function to be called must be public. That means it has to be forwarded.
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- SetTimer: Set a timer.
- KillTimer: Stop a timer.
- CallLocalFunction: Call a function in the script.
- CallRemoteFunction: Call a function in any loaded script.
| openmultiplayer/web/docs/translations/th/scripting/functions/SetTimerEx.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/SetTimerEx.md",
"repo_id": "openmultiplayer",
"token_count": 1394
} | 447 |
---
title: ShowNameTags
description: Toggle the drawing of nametags, health bars and armor bars above players.
tags: []
---
## คำอธิบาย
Toggle the drawing of nametags, health bars and armor bars above players.
| Name | Description |
| ------- | ----------------------------------------------- |
| enabled | 0 to disable, 1 to enable (enabled by default). |
## ส่งคืน
This function does not return any specific values.
## ตัวอย่าง
```c
public OnGameModeInit()
{
// This will fully disable all player nametags
// (including health and armour bars)
ShowNameTags(0);
}
```
## บันทึก
:::warning
This function can only be used in OnGameModeInit. For other times, see ShowPlayerNameTagForPlayer.
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- DisableNameTagLOS: Disable nametag Line-Of-Sight checking.
- ShowPlayerNameTagForPlayer: Show or hide a nametag for a certain player.
- ShowPlayerMarkers: Decide if the server should show markers on the radar.
| openmultiplayer/web/docs/translations/th/scripting/functions/ShowNameTags.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/ShowNameTags.md",
"repo_id": "openmultiplayer",
"token_count": 414
} | 448 |
---
title: TextDrawDestroy
description: Destroys a previously-created textdraw.
tags: ["textdraw"]
---
## คำอธิบาย
Destroys a previously-created textdraw.
| Name | Description |
| ---- | -------------------------------------------------------------- |
| text | The ID of the textdraw to destroy. Returned by TextDrawCreate. |
## ส่งคืน
This function does not return any specific values.
## ตัวอย่าง
```c
new Text:textdraw[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
textdraw[playerid] = TextDrawCreate(...);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
TextDrawDestroy(textdraw[playerid]);
return 1;
}
```
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- [TextDrawCreate](../functions/TextDrawCreate.md): Create a textdraw.
- [TextDrawColor](../functions/TextDrawColor.md): Set the color of the text in a textdraw.
- [TextDrawBoxColor](../functions/TextDrawBoxColor.md): Set the color of the box in a textdraw.
- [TextDrawBackgroundColor](../functions/TextDrawBackgroundColor.md): Set the background color of a textdraw.
- [TextDrawAlignment](../functions/TextDrawAlignment.md): Set the alignment of a textdraw.
- [TextDrawFont](../functions/TextDrawFont.md): Set the font of a textdraw.
- [TextDrawLetterSize](../functions/TextDrawLetterSize.md): Set the letter size of the text in a textdraw.
- [TextDrawTextSize](../functions/TextDrawTextSize.md): Set the size of a textdraw box.
- [TextDrawSetOutline](../functions/TextDrawSetOutline.md): Choose whether the text has an outline.
- [TextDrawSetShadow](../functions/TextDrawSetShadow.md): Toggle shadows on a textdraw.
- [TextDrawSetProportional](../functions/TextDrawSetProportional.md): Scale the text spacing in a textdraw to a proportional ratio.
- [TextDrawUseBox](../functions/TextDrawUseBox.md): Toggle if the textdraw has a box or not.
- [TextDrawSetString](../functions/TextDrawSetString.md): Set the text in an existing textdraw.
- [TextDrawShowForPlayer](../functions/TextDrawShowForPlayer.md): Show a textdraw for a certain player.
- [TextDrawHideForPlayer](../functions/TextDrawHideForPlayer.md): Hide a textdraw for a certain player.
- [TextDrawShowForAll](../functions/TextDrawShowForAll.md): Show a textdraw for all players.
- [TextDrawHideForAll](../functions/TextDrawHideForAll.md): Hide a textdraw for all players.
| openmultiplayer/web/docs/translations/th/scripting/functions/TextDrawDestroy.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/TextDrawDestroy.md",
"repo_id": "openmultiplayer",
"token_count": 833
} | 449 |
---
title: TextDrawUseBox
description: Toggle whether a textdraw uses a box or not.
tags: ["textdraw"]
---
## คำอธิบาย
Toggle whether a textdraw uses a box or not.
| Name | Description |
| ---- | ------------------------------------------------- |
| text | The ID of the text textdraw to toggle the box of. |
| use | 1 to show a box or 0 to not show a box. |
## ส่งคืน
1: The function executed successfully.
0: The function failed to execute. This means the textdraw specified does not exist.
## ตัวอย่าง
```c
new Text:MyTextdraw;
public OnGameModeInit()
{
MyTextDraw = TextDrawCreate(100.0, 33.0, "Example TextDraw");
TextDrawUseBox(MyTextDraw, true); // Toggle box ON
return 1;
}
```
## บันทึก
:::tip
If the textdraw is already shown, it must be re-shown ([TextDrawShowForAll](TextDrawShowForAll)/[TextDrawShowForPlayer](TextDrawShowForPlayer)) to show the changes of this function.
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- [TextDrawCreate](../functions/TextDrawCreate.md): Create a textdraw.
- [TextDrawDestroy](../functions/TextDrawDestroy.md): Destroy a textdraw.
- [TextDrawColor](../functions/TextDrawColor.md): Set the color of the text in a textdraw.
- [TextDrawBoxColor](../functions/TextDrawBoxColor.md): Set the color of the box in a textdraw.
- [TextDrawBackgroundColor](../functions/TextDrawBackgroundColor.md): Set the background color of a textdraw.
- [TextDrawAlignment](../functions/TextDrawAlignment.md): Set the alignment of a textdraw.
- [TextDrawFont](../functions/TextDrawFont.md): Set the font of a textdraw.
- [TextDrawLetterSize](../functions/TextDrawLetterSize.md): Set the letter size of the text in a textdraw.
- [TextDrawTextSize](../functions/TextDrawTextSize.md): Set the size of a textdraw box.
- [TextDrawSetOutline](../functions/TextDrawSetOutline.md): Choose whether the text has an outline.
- [TextDrawSetShadow](../functions/TextDrawSetShadow.md): Toggle shadows on a textdraw.
- [TextDrawSetProportional](../functions/TextDrawSetProportional.md): Scale the text spacing in a textdraw to a proportional ratio.
- [TextDrawSetString](../functions/TextDrawSetString.md): Set the text in an existing textdraw.
- [TextDrawShowForPlayer](../functions/TextDrawShowForPlayer.md): Show a textdraw for a certain player.
- [TextDrawHideForPlayer](../functions/TextDrawHideForPlayer.md): Hide a textdraw for a certain player.
- [TextDrawShowForAll](../functions/TextDrawShowForAll.md): Show a textdraw for all players.
- [TextDrawHideForAll](../functions/TextDrawHideForAll.md): Hide a textdraw for all players.
| openmultiplayer/web/docs/translations/th/scripting/functions/TextDrawUseBox.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/TextDrawUseBox.md",
"repo_id": "openmultiplayer",
"token_count": 918
} | 450 |
---
title: db_close
description: Closes an SQLite database that was opened with db_open.
tags: [sqlite]
---
:::warning
This function starts with lowercase letter.
:::
## คำอธิบาย
Closes an SQLite database that was opened with db_open.
| Name | Description |
| ----- | --------------------------------------------------------------------- |
| DB:db | The handle of the database connection to close (returned by db_open). |
## ส่งคืน
1: The function executed successfully.
0: The function failed to execute. May mean that the database handle specified is not open.
## ตัวอย่าง
```c
new DB:db_handle;
// ...
public OnGameModeInit()
{
// Create a connection to the database
if ((db_handle = db_open("example.db")) == DB:0)
{
// Error
print("Failed to open a connection to \"example.db\".");
SendRconCommand("exit");
}
else
{
// Success
print("Successfully created a connection to \"example.db\".");
}
// ...
return 1;
}
public OnGameModeExit()
{
// Close the connection to the database
db_close(db_handle);
// ...
return 1;
}
```
## บันทึก
:::warning
Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references.
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- db_open: Open a connection to an SQLite database
- db_close: Close the connection to an SQLite database
- db_query: Query an SQLite database
- db_free_result: Free result memory from a db_query
- db_num_rows: Get the number of rows in a result
- db_next_row: Move to the next row
- db_num_fields: Get the number of fields in a result
- db_field_name: Returns the name of a field at a particular index
- db_get_field: Get content of field with specified ID from current result row
- db_get_field_assoc: Get content of field with specified name from current result row
- db_get_field_int: Get content of field as an integer with specified ID from current result row
- db_get_field_assoc_int: Get content of field as an integer with specified name from current result row
- db_get_field_float: Get content of field as a float with specified ID from current result row
- db_get_field_assoc_float: Get content of field as a float with specified name from current result row
- db_get_mem_handle: Get memory handle for an SQLite database that was opened with db_open.
- db_get_result_mem_handle: Get memory handle for an SQLite query that was executed with db_query.
- db_debug_openfiles
- db_debug_openresults
| openmultiplayer/web/docs/translations/th/scripting/functions/db_close.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/db_close.md",
"repo_id": "openmultiplayer",
"token_count": 923
} | 451 |
---
title: db_open
description: This function is used to open a connection to a SQLite database, which is inside the "/scriptfiles" folder.
tags: ["sqlite"]
---
:::warning
This function starts with lowercase letter.
:::
## คำอธิบาย
This function is used to open a connection to a SQLite database, which is inside the "/scriptfiles" folder
| Name | Description |
| ------ | ------------------------- |
| name[] | File name of the database |
## ส่งคืน
Returns index (starting at 1) of the database connection .
## ตัวอย่าง
```c
new DB:db_handle;
// ...
public OnGameModeInit()
{
// Create a connection to the database
if ((db_handle = db_open("example.db")) == DB:0)
{
// Error
print("Failed to open a connection to \"example.db\".");
SendRconCommand("exit");
}
else
{
// Success
print("Successfully created a connection to \"example.db\".");
}
// ...
return 1;
}
public OnGameModeExit()
{
// Close the connection to the database
db_close(db_handle);
// ...
return 1;
}
```
## บันทึก
:::warning
It will create a new SQLite database, if there is no SQLite database with the same file name available. Close your database connection with db_close!
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- db_open: Open a connection to an SQLite database
- db_close: Close the connection to an SQLite database
- db_query: Query an SQLite database
- db_free_result: Free result memory from a db_query
- db_num_rows: Get the number of rows in a result
- db_next_row: Move to the next row
- db_num_fields: Get the number of fields in a result
- db_field_name: Returns the name of a field at a particular index
- db_get_field: Get content of field with specified ID from current result row
- db_get_field_assoc: Get content of field with specified name from current result row
- db_get_field_int: Get content of field as an integer with specified ID from current result row
- db_get_field_assoc_int: Get content of field as an integer with specified name from current result row
- db_get_field_float: Get content of field as a float with specified ID from current result row
- db_get_field_assoc_float: Get content of field as a float with specified name from current result row
- db_get_mem_handle: Get memory handle for an SQLite database that was opened with db_open.
- db_get_result_mem_handle: Get memory handle for an SQLite query that was executed with db_query.
- db_debug_openfiles
- db_debug_openresults
| openmultiplayer/web/docs/translations/th/scripting/functions/db_open.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/db_open.md",
"repo_id": "openmultiplayer",
"token_count": 877
} | 452 |
---
title: floatfract
description: Get the fractional part of a float.
tags: []
---
:::warning
This function starts with lowercase letter.
:::
## คำอธิบาย
Get the fractional part of a float. This means the value of the numbers after the decimal point.
| Name | Description |
| ----- | ---------------------------------------- |
| value | The float to get the fractional part of. |
## ส่งคืน
The fractional part of the float, as a float value.
## ตัวอย่าง
```c
new Float:fFract = floatfract(3.14159); // returns 0.14159
```
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- [floatround](../functions/floatround): Convert a float to an integer (rounding).
| openmultiplayer/web/docs/translations/th/scripting/functions/floatfract.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/floatfract.md",
"repo_id": "openmultiplayer",
"token_count": 307
} | 453 |
---
title: fseek
description: Change the current position in the file.
tags: []
---
:::warning
This function starts with lowercase letter.
:::
## คำอธิบาย
Change the current position in the file. You can either seek forward or backward through the file.
| Name | Description |
| ------------ | --------------------------------------------------------------------------------------------------------------------- |
| handle | The file handle to use. Returned by fopen. |
| position | The new position in the file, relative to the parameter whence (see below). |
| whence | The starting position to which parameter position relates. |
| seek_start | Set the file position relative to the start of the file (the position parameter must be positive). |
| seek_current | Set the file position relative to the current file position: the position parameter is added to the current position. |
| seek_end | Set the file position relative to the end of the file (parameter position must be zero or negative). |
## ส่งคืน
The new position; relative to the start of the file.
## ตัวอย่าง
```c
// Open "file.txt" in "read only" mode
new File:handle = fopen("file.txt", io_read);
// If "file.txt" is open
if (handle)
{
// Success
// Jump to the 1st byte of "file.txt", and print its position
printf("Begin of file position: %d", fseek(handle, 0, seek_start));
// Jump to the last byte of "file.txt", and print its position
printf("End of file position: %d", fseek(handle, 0, seek_end));
// Jump to the same byte of "file.txt", and print its position
printf("Currrent file position: %d", fseek(handle, 0, seek_current));
// Close "file.txt"
fclose(handle);
}
else
{
// Error
print("Failed to open \"file.txt\".");
}
```
## บันทึก
:::warning
Using an invalid handle will crash your server! Get a valid handle by using fopen or ftemp.
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- [fopen](../functions/fopen): Open a file.
- [fclose](../functions/fclose): Close a file.
- [ftemp](../functions/ftemp): Create a temporary file stream.
- [fremove](../functions/fremove): Remove a file.
- [fwrite](../functions/fwrite): Write to a file.
- [fread](../functions/fread): Read a file.
- [fputchar](../functions/fputchar): Put a character in a file.
- [fgetchar](../functions/fgetchar): Get a character from a file.
- [fblockwrite](../functions/fblockwrite): Write blocks of data into a file.
- [fblockread](../functions/fblockread): Read blocks of data from a file.
- [fseek](../functions/fseek): Jump to a specific character in a file.
- [flength](../functions/flength): Get the file length.
- [fexist](../functions/fexist): Check, if a file exists.
- [fmatch](../functions/fmatch): Check, if patterns with a file name matches.
| openmultiplayer/web/docs/translations/th/scripting/functions/fseek.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/fseek.md",
"repo_id": "openmultiplayer",
"token_count": 1265
} | 454 |
---
title: printf
description: Outputs a formatted string on the console (the server window, not the in-game chat).
tags: []
---
:::warning
This function starts with lowercase letter.
:::
## คำอธิบาย
Outputs a formatted string on the console (the server window, not the in-game chat).
| Name | Description |
| -------------- | ----------------------------------------- |
| format[] | The format string |
| {Float,\_}:... | Indefinite number of arguments of any tag |
## ส่งคืน
This function does not return any specific values.
## ตัวอย่าง
```c
new number = 42;
printf("The number is %d.",number); //-> The number is 42.
new string[]= "simple message";
printf("This is a %s containing the number %d.", string, number); //-> This is a simple message containing the number 42.
new character = 64;
printf("I'm %c home",character); //-> I'm @ home
```
## บันทึก
:::warning
The format string or its output should not exceed 1024 characters. Anything beyond that length can lead to a server to crash.
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- print: Print a basic message to the server logs and console.
- format: Format a string.
| openmultiplayer/web/docs/translations/th/scripting/functions/printf.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/printf.md",
"repo_id": "openmultiplayer",
"token_count": 483
} | 455 |
---
title: "Bone IDs"
---
:::note
To be used with [SetPlayerAttachedObject](../functions/SetPlayerAttachedObject).
:::
| ID | Bone |
| --- | ------------------------- |
| 1 | Spine |
| 2 | Head |
| 3 | Left upper arm |
| 4 | Right upper arm |
| 5 | Left hand |
| 6 | Right hand |
| 7 | Left thigh |
| 8 | Right thigh |
| 9 | Left foot |
| 10 | Right foot |
| 11 | Right calf |
| 12 | Left calf |
| 13 | Left forearm |
| 14 | Right forearm |
| 15 | Left clavicle (shoulder) |
| 16 | Right clavicle (shoulder) |
| 17 | Neck |
| 18 | Jaw |
| openmultiplayer/web/docs/translations/th/scripting/resources/boneid.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/resources/boneid.md",
"repo_id": "openmultiplayer",
"token_count": 497
} | 456 |
---
title: GameText Styles
description: GameText Styles to be used in textdraws and gametext
---
To be used with [GameText](../functions/GameTextForPlayer).
## Text Colors
- `~n~` New line
- `~r~` Red
- `~g~` Green
- `~b~` Blue
- `~w~` or ~s~ White
- `~y~` Yellow
- `~p~` Purple
- `~l~` Black (lower case L)
- `~h~` Turn text color lighter (used too much will make your text white, doesn't work on black)
## Special Text Letters
- `~u~` up arrow (gray)
- `~d~` down arrow (gray)
- `~<~` left arrow (gray)
- `~>~` right arrow (gray)
- `]` displays a \* symbol (Only in text styles 3, 4 and 5)
- `~k~` keyboard key mapping (e.g. ~k~~VEHICLE_TURRETLEFT~ and ~k~~PED_FIREWEAPON~). Look here for a list of keys
:::caution
Be careful, using too many text colors or special characters in one gametext may crash every player the gametext is shown to. Additionally, avoid using an uneven usage of the ~ character. Example: `~`~r~Hello, ~g~how are ~y~`~`you?`~`
:::
## Text Styles
| Style | Preview | Description |
| ------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Style 0 |  | Appears for 9 seconds regardless of time setting. Hides textdraws and any other gametext on screen. Fixed in fixes.inc. |
| Style 1 |  | Fades out after 8 seconds, regardless of time set. If you have a time setting longer than that, it will re-appear after fading out and repeat until the time ends. Fixed in fixes.inc. |
| Style 2 |  | N/A |
| Style 3 |  | N/A |
| Style 4 |  | N/A |
| Style 5 |  | Displays for 3 seconds, regardless of what time you set. Will refuse to be shown if it is 'spammed'. Fixed in fixes.inc. |
| Style 6 |  | N/A |
| Style 7 |  | Based on SA vehicle names. Added by fixes.inc |
| Style 8 |  | Based on SA location names. Added by fixes.inc |
| Style 9 |  | Based on SA radio station names (once selected). Added by fixes.inc |
| Style 10 |  | Based on SA radio station names (while switching). Added by fixes.inc |
| Style 11 |  | Based on SA positive money. Added by fixes.inc |
| Style 12 |  | Based on SA negative money. Added by fixes.inc |
| Style 13 |  | Based on SA stunt bonuses. Added by fixes.inc |
| Style 14 |  | Based on SA in-game clock. Added by fixes.inc |
| Style 15 |  | Based on SA notification popup. Added by fixes.inc |
| openmultiplayer/web/docs/translations/th/scripting/resources/gametextstyles.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/resources/gametextstyles.md",
"repo_id": "openmultiplayer",
"token_count": 3367
} | 457 |
---
title: OnGameModeInit
description: Bu callback oyun modu başladığında tetiklenir.
tags: []
---
## Açıklama
Bu callback oyun modu başladığında tetiklenir.
## Örnekler
```c
public OnGameModeInit()
{
print("Gamemode started!");
return 1;
}
```
## Notlar
:::tip
Bu fonksiyon ayrıca bir filterscript içinde eğer oyun modu changemode veya gmx gibi komutlarla değiştirilirse oyun modu değişim kontrolünün yapılması için kullanılabilir.(filterscript yeniden yüklenmez)
:::
## Bağlantılı Fonksiyonlar
| openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnGameModeInit.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnGameModeInit.md",
"repo_id": "openmultiplayer",
"token_count": 234
} | 458 |
---
title: OnPlayerExitVehicle
description: Bu callback, araçta bulunan bir oyuncu bir araçtan inmeye başladığında çağırılır.
tags: ["player", "vehicle"]
---
## Açıklama
Bu callback, araçta bulunan bir oyuncu bir araçtan inmeye başladığında çağırılır.
| İsim | Açıklama |
| --------- | ----------------------------------------------- |
| playerid | Araçtan inmekte olan oyuncunun ID'si. |
| vehicleid | Oyuncunun inmekte olduğu aracın ID'si. |
## Çalışınca Vereceği Sonuçlar
Her zaman ilk olarak filterscriptlerde çağırılır.
## Örnekler
```c
public OnPlayerExitVehicle(playerid, vehicleid)
{
new string[35];
format(string, sizeof(string), "BİLGİ: %i ID'li araçtan iniyorsun.", vehicleid);
SendClientMessage(playerid, 0xFFFFFFFF, string);
return 1;
}
```
## Notlar
:::warning
Bu callback, oyuncu motordan düştüğünde veya SetPlayerPos gibi fonksiyonlar kullanılarak araçtan başka bir şekilde çıkartıldığında çağırılmaz. Bunu sağlamak için OnPlayerStateChange'de eski durumlarının PLAYER_STATE_DRIVER veya PLAYER_STATE_PASSENGER ve yeni durumlarının PLAYER_STATE_ONFOOT olup olmadığına bakmalısınız.
:::
## Bağlantılı Fonksiyonlar
- [RemovePlayerFromVehicle](../functions/RemovePlayerFromVehicle): Throw a player out of their vehicle.
- [GetPlayerVehicleSeat](../functions/GetPlayerVehicleSeat): Check what seat a player is in.
| openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnPlayerExitVehicle.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnPlayerExitVehicle.md",
"repo_id": "openmultiplayer",
"token_count": 633
} | 459 |
---
title: OnPlayerSpawn
description: Bu fonksiyon, oyuncu doğduğunda çağrılır.
tags: ["player"]
---
## Açıklama
Bu fonksiyon, oyuncu doğduğunda çağrılır.(ör. SpawnPlayer'i çalıştırdıktan sonra)
| Parametre | Açıklama |
| --------- | ---------------------------------- |
| playerid | Doğan oyuncunun ID'si. |
## Çalışınca Vereceği Sonuçlar
0 - Diğer filterscript komutlarının bu çağrıyı almasını önleyecektir.
1 - Bu geri çağrının sonraki filterscript komutuna aktarılacağını belirtir.
Filterscript komutlarında her zaman ilk olarak çağırılır.
## Örnekler
```c
public OnPlayerSpawn(playerid)
{
new PlayerName[MAX_PLAYER_NAME],
string[40];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
format(string, sizeof(string), "%s adlı kişi başarıyla doğdu.", PlayerName);
SendClientMessageToAll(0xFFFFFFFF, string);
return 1;
}
```
## Notlar
:::tip
Oyuncu spawn olduktan sonra bazen \$100 oyuncunun üzerinden alabilir.
:::
## Bağlantılı Fonksiyonlar
- [SpawnPlayer](../functions/SpawnPlayer): Oyuncuyu doğmaya zorlama.
- [AddPlayerClass](../functions/AddPlayerClass): Bir sınıf ekleme.
- [SetSpawnInfo](../functions/SetSpawnInfo): Oyuncunun doğma bilgilerini düzenleyin.
| openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnPlayerSpawn.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnPlayerSpawn.md",
"repo_id": "openmultiplayer",
"token_count": 577
} | 460 |
---
title: OnVehicleRespray
description: Bu callback, aracın renkleri değişmemiş olsa bile oyuncu bir mod mağazasından çıktığında çağrılır.
tags: ["vehicle"]
---
## Açıklama
Bu callback, aracın renkleri değişmemiş olsa bile oyuncu bir mod mağazasından çıktığında çağrılır. Dikkat edin, isim yanıltabilir. Pay 'n' Spray mağazaları bu callbacki kullanamaz.
| İsim | Açıklama |
| --------- | ----------------------------------------- |
| playerid | Aracı kullanan oyuncu ID'si. |
| vehicleid | Yeniden boyanan aracın ID'si. |
| color1 | Aracın değiştirildiği yeni ana rengi. |
| color2 | Aracın değiştirildiği yeni ikinci rengi. |
## Çalışınca Vereceği Sonuçlar
Her zaman ilk olarak oyun modunda çağrılır, bu yüzden 0 döndürerek diğer filterscriptslerin görmesini engeller.
## Örnekler
```c
public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
new string[48];
format(string, sizeof(string), "%d ID aracınızı %d renginden %d rengine boyadınız!", vehicleid, color1, color2);
SendClientMessage(playerid, COLOR_GREEN, string);
return 1;
}
```
## Notlar
:::tip
Bu callback ChangeVehicleColor tarafından çağrılamaz. Pay 'n' Spray için kullanılamaz, sadece mod mağazaları için kullanılabilir.
Buradan düzeltilebilir: http://pastebin.com/G81da7N1
:::
:::warning
Bilinen Bug(lar): Mod mağazasında bir parçayı önizlemek bu callbacki çalıştırabilir.
:::
## Bağlantılı Fonksiyonlar
- [ChangeVehicleColor](../functions/ChangeVehicleColor): Aracın rengini ayarlar.
- [ChangeVehiclePaintjob](../functions/ChangeVehiclePaintjob): Aracın paintjobunu ayarlar.
- [OnVehiclePaintjob](OnVehiclePaintjob): Aracın paintjobu değiştiğinde çağrılır.
- [OnVehicleMod](OnVehicleMod): Araç modlandığında (parça eklendiğinde) çağrılır.
- [OnEnterExitModShop](OnEnterExitModShop): Araç mod mağazasına girince veya çıkınca çağrılır.
| openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnVehicleRespray.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnVehicleRespray.md",
"repo_id": "openmultiplayer",
"token_count": 911
} | 461 |
---
title: AllowAdminTeleport
description: Bu fonksiyon RCON olan kişilerin nokta seçtiğinde ışınlanıp ışınlanamayacağına karar vermenizi sağlar.
tags: []
---
:::warning
0.3d sürümü ile bu fonksiyon kullanılamamakta, lütfen [OnPlayerClickMap](../callbacks/OnPlayerClickMap) callbackine göz atın.
:::
## Açıklama
Bu fonksiyon RCON olan kişilerin nokta seçtiğinde ışınlanıp ışınlanamayacağına karar vermenizi sağalar.
| İsim | Açıklama |
| ----------------------------------- | ------------------------------------------------------------------------------------------------------ |
| allow | açmak için 1, kapamak için 0 |
## Çalışınca Vereceği Sonuçlar
Bu fonksiyon geliştiriciye dönüt vermez.
## Örnekler
```c
public OnGameModeInit()
{
AllowAdminTeleport(1); // RCON'ların noktalara ışınlanabilmesini sağladık
return 1;
}
```
## Notlar
:::warning
Bu fonksiyon şu anki SA:MP sürümünde çalışmamakta!
:::
## Bağlantılı Fonksiyonlar
- [IsPlayerAdmin](IsPlayerAdmin.md): Oyuncunun interiorunu değiştirin.
- [AllowPlayerTeleport](AllowPlayerTeleport.md): Oyuncunun interiorunu öğrenin.
- [OnPlayerInteriorChange](../callbacks/OnPlayerInteriorChange.md): Bu callback oyuncunun interioru değiştiğinde çağrılır.
| openmultiplayer/web/docs/translations/tr/scripting/functions/AllowAdminTeleport.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/functions/AllowAdminTeleport.md",
"repo_id": "openmultiplayer",
"token_count": 754
} | 462 |
---
title: CancelEdit
description: Obje düzenleme modunu iptal etme.
tags: []
---
## Açıklama
Obje düzenleme modunu iptal etme.
| Parametre | Açıklama |
| --------- | ------------------------------------------ |
| playerid | Obje düzenlemesi iptal edilecek oyuncu. |
## Çalışınca Vereceği Sonuçlar
Bu fonksiyon bir değer/döngü vermez.
## Örnekler
```c
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp(cmdtext, "/stopedit", true))
{
CancelEdit(playerid);
SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Obje düzenleme modunu iptal ettiniz!");
return 1;
}
return 0;
}
```
## Bağlantılı Fonksiyonlar
- [SelectObject](SelectObject): Obje seçme.
- [EditObject](EditObject): Obje düzenleme.
- [EditPlayerObject](EditPlayerObject): Oyuncu objesi düzenleme.
- [EditAttachedObject](EditAttachedObject): Bağlanmış objeyi düzenleme.
- [CreateObject](CreateObject): Obje oluşturma.
- [DestroyObject](DestroyObject): Obje silme.
- [MoveObject](MoveObject): Obje hareket ettirme.
| openmultiplayer/web/docs/translations/tr/scripting/functions/CancelEdit.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/functions/CancelEdit.md",
"repo_id": "openmultiplayer",
"token_count": 468
} | 463 |
---
title: GetActorPoolSize
description: Sunucuda oluşturulan en yüksek aktör ID'sini kontrol etme.
tags: ["actor"]
---
<VersionWarnTR version='SA-MP 0.3.7' />
## Açıklama
Sunucuda oluşturulan en yüksek aktör ID'sini kontrol etme.
## Örnekler
```c
SetAllActorsHealth(Float:health)
{
for(new i = 0, j = GetActorPoolSize(); i <= j; i++) // Aktör havuzunu oluşturduk. J fonksiyonunu oluşturulmuş en yüksek ID'ye sahip aktöre eşitledik ve döngümüzü oluşturduk.
{
if (IsValidActor(i)) // Eğer i fonksiyonundaki ID geçerli/oluşturulmuş bir aktörse...
{
SetActorHealth(i, health); //...canını BLABLA olarak düzenledik.
}
}
}
```
## Bağlantılı Fonksiyonlar
- [CreateActor](CreateActor): Aktör oluşturma. (statik NPC).
- [IsValidActor](isValidActor): Aktörün oluşturulup oluşturulmadığını kontrol etme.
- [SetActorHealth](SetActorHealth): Aktörün can değerini düzenleme.
| openmultiplayer/web/docs/translations/tr/scripting/functions/GetActorPoolSize.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/functions/GetActorPoolSize.md",
"repo_id": "openmultiplayer",
"token_count": 443
} | 464 |
---
title: "Temel: Değişkenler"
description: Pawn dilinde değişkenlere yönelik başlangıç rehberi
---
## Değişkenler
Programlamadaki en önemli kavramlardan biri "değişken" kavramıdır. Programlamada değişken, bir şeyin ne bakımından değişebileceği kavramını ifade eder. Pawn dilinde bir değişken herhangi bir zamanda bir "değer" taşır ve bu değer -adından da anlaşılacağı gibi- "değişken" veya "değiştirilebilir"dir.
Değişkenler neden bu kadar önemlidir? Temelde, değişkenler bilgisayar belleğinin küçük birimleridir ve program yürütülürken (çalıştırılırken) bu birimler farklı değerleri tutabilir veya "hatırlayabilir". Bu özellik, programlamada çok kullanışlıdır. Örneğin, bir oyundaki 100 oyuncunun puanlarını takip etmek istiyorsanız, bilgisayara bu değerleri depolamayı (hatırlamayı) ve güncellemeyi programlamayı öğretebilirsiniz. Daha sonra bu değişkenlerden elde edilen değerlere kolayca erişilebilir ve bu değerlerle ortalama puanı bulmak veya bir liderlik tablosu oluşturmak gibi amaçlar için kullanılabilir.
### Değişkenleri Bildirme
Değişken bildirimi için aşağıdaki sözdizimi kullanılır:
```c
// 'myVariable' adında bir değişken oluşturuyoruz (daha uygun bir ifadeyle 'bildiriyoruz').
new myVariable;
// Bir değişken bildirmek için 'new' anahtar kelimesi kullanılır
// Yukarıdaki satırda 'myVariable' adında bir değişken bildiriliyor
// Bildirimi kapatmak için sona noktalı virgül konur.
```
Bildirim sözdizimi, aşağıdaki örneklerle daha iyi anlaşılabilir:
```c
new var;
new ammo;
new score;
new vehicles;
new topScore;
```
Yukarıda tanımlanan her bir değişkenin varsayılan olarak bir değeri vardır ve bu değer sıfırdır. Değerleri değişkenlere atamanın farklı yolları vardır. Bir yöntem, bir değişkene doğrudan bir değer atamaktır:
```c
new letters = 25;
```
Yukarıdaki örnekte, 'letters' adında bir değişken bildiriliyor ve değeri 25 olarak atanıyor. Bir değeri doğrudan bildirim sırasında atamanın yanı sıra, kodun daha sonraki bölümlerinde de yapabilirsiniz:
```c
new letters;
letters = 25;
```
### Kapsamlar
Bir değişkenin değerini değiştirmek, değişkeni referans aldığınız kodun kapsamı içinde mümkündür. Bir değişkenin kapsamı, değişkenin bildirildiği kod bloğuna veya konumuna bağlıdır. Örneğin, kod bloklarından herhangi birinin dışında, genellikle betiğin başında bildirilen bir değişkenin 'Global' kapsamı vardır ve betiğin herhangi bir yerinden erişilebilir:
```c
#include <a_samp>
new g_var = 5;
public OnFilterScriptInit ()
{
g_var = 10;
printf ("Değer %i", g_var);
return 1;
}
public OnPlayerConnect (playerid)
{
g_var = 100;
printf ("Değer %i", g_var);
return 1;
}
// Çıktı:
// Değer 10
// Değer 100
// Not: İkinci çıktı satırı yalnızca bir oyuncu bağlandığında gösterilir.
```
'Global' (kapsamlı) değişkenler dışında, yalnızca tanımlandıkları kod bloğundan erişilebilen 'yerel' veya 'özel' değişkenler de bulunmaktadır.
```c
#include <a_samp>
public OnFilterScriptInit ()
{
new localVar;
localVar = 5;
return 1;
}
public OnPlayerConnect (playerid)
{
localVar = 10; // Bu satır derleme sırasında bir hata verecektir
return 1;
}
```
Yukarıdaki kodu derlemeye çalışırsanız, derleyici, bir yerel değişkenin tamamen farklı bir kod bloğunda kullanılması nedeniyle bir hata gösterecektir. Not: Eğer iç içe geçmiş bir kod bloğu ise değişkene oradan erişilebilir.
Bir şeyi unutmamanız gereken önemli bir şey, kapsamlarının iç içe girmesi durumunda değişkenlere aynı isimleri veremezsiniz. Örneğin, zaten genel bir kapsamdaki 'score' adında bir değişkeniniz varsa, aynı adı taşıyan başka bir değişkeni genel kapsamda ve yerel bir kapsamda bildirmemelisiniz ve bu aynı şekilde geçerlidir (zaten yerel bir değişkeniniz varsa, aynı adı taşıyan bir genel değişkeni bildirmekten kaçının).
```c
#include <a_samp>
new g_score;
public OnFilterScriptInit ()
{
new g_score = 5; // Bu satır bir hatayı gösterecektir.
return 1;
}
```
### İsimlendirme Kuralları
Artık değişkenleri nasıl bildireceğinizi bildiğinize göre, değişken bildirme için isimlendirme kurallarını da bilmelisiniz. İşte değişken bildirme için isimlendirme kuralları:
- Tüm değişken adları bir harfle veya alt çizgi (`_`) ile başlamalıdır.
- İlk harf sonrasında değişken adları harf ve rakam içerebilir, ancak boşluk veya özel karakter içermemelidir.
- Değişken adları büyük/küçük harfe duyarlıdır, yani büyük harfler küçük harflerden farklıdır.
- Bir rezerve kelimeyi (anahtar kelime) bir değişken adı olarak kullanmak bir hatayı gösterir.
#### Örnekler:
```c
new new; // Yanlış: Bir rezerve kelime kullanılıyor
new _new; // Doğru
new 10letters; // Yanlış: Rakamla başlayan bir isim
new letters10; // Doğru
new letters_10; // Doğru
new my name; // Yanlış: İsimde boşluk var
new my_name; // Doğru
new !nternet; // Yanlış
new Internet; // Doğru
```
### Farklı Veri Türlerini Saklama
Bunun ardından, değişkenlere hangi türde veri saklanabileceğine ve nasıl saklanacağına dair bazı örnekleri inceleyelim:
```c
new letter = 'M';
new value = 100;
new decimalValue = 1.0;
// Çalışır, ancak bir derleyici uyarısı gösterecektir
// Uyarı 213: etiket uyumsuzluğu
new engineOn = true;
// Çalışır ve derleyici uyarı göstermeyecek, ancak bir Etiket kullanımı önerilir
new sentence = "Bu bir cümle";
// Hata gösterecektir.
// Hata 006: diziye atanmalı
```
Bir değişken, bir karakteri, tamsayı değerini, boolean (true veya false) ve bir ondalık değeri (ondalık değer) tutabilir. Yukarıdaki kodun yorumları, bir dizeyi bir değişkende saklamanın bir hataya neden olduğunu gösterir (çünkü dizeler yalnızca _Dizilere_ atanabilir). Bunun dışında, bir değişkene ondalık bir değer atamak, bir derleyici uyarısına neden olur ve bu uyarı, 'etiketler' eklenerek önlenir. Doğru etiketler kullanılmazsa, betik derleme sırasında uyarılar gösterecek, ancak yine de çalıştırılabilir olacaktır. Etiketler, değişkende depolanacak olan veri türü hakkında derleyiciyi bilgilendirir, bu da bize programı bozan bir hata yaparsak hata veya uyarı şeklinde bilgi verir. Etiket örnekleri:
```c
new decimalValue = 1.0; // Yanlış
new bool: decimalValue = 1.0 // Yanlış
new Float: decimalValue = 1.0; // Doğru
new switchOn = 1.0; // Yanlış
new switchOn = true; // Yanlış, uyarı göstermez
new bool: switchOn = true; // Doğru
```
Doğru etiketleri kullanmak, program yürütme sırasında herhangi bir hata veya hatayı önlemek için önemlidir.
Pawn, tip olmayan bir dil olduğu için aynı değişkende farklı türde verileri saklama olanağı sağlar, bu bazı durumlarda faydalı olabilirken diğer durumlarda sorunlara neden olabilir, ancak değişkenlerin böyle kullanılması önerilmez.
```c
#include <a_samp>
public OnFilterScriptInit ()
{
new var ;
var = 'a';
printf ("%c", var);
var = 1;
printf ("%d", var);
var = 1.0;
printf ("%f", var);
var = true;
printf ("%d", var); // 0 veya 1 değerini yazdırır
return 1;
}
// Çıktı :
a
1
1.000000
1
```
| openmultiplayer/web/docs/translations/tr/scripting/language/Variables.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/language/Variables.md",
"repo_id": "openmultiplayer",
"token_count": 3367
} | 465 |
---
title: 常见问题
---
## 内容
## 客户端
### 出现错误信息“无法找到 San Andreas”
圣安地列斯多人游戏**不**是一个独立的程序! 它为圣安地列斯增加了联机功能,因此你需要圣安地列斯特定 PC 版本 - 并且它需要是**EU/US v1.0**版本,其他版本例如 v2.0 或 Steam 以及 Direct2Drive 版本不能联机。[点击这里下载一个补丁来降低你的 GTA:SA 版本到 1.0](http://grandtheftauto.filefront.com/file/GTA_SA_Downgrader_Patch;74661)
### 我在 SA:MP 浏览页中看不到任何服务器
首先,确保你遵循了[快速入门指南](https://team.sa-mp.com/wiki/Getting_Started)中列出的程序。如果你按照它要求的做了,但仍然看不到任何服务器,那么你必须允许 SA:MP 通过防火墙访问。不幸的是,由于大量可用的防火墙软件,我们不能提供进一步的支持 - 我们建议看看防火墙软件制造商的网站或尝试谷歌搜索,还要确保你有最新的 SA:MP 版本!
### 加载了单机游戏而非 SA:MP
:::warning
你不应该看到单人游戏的选项(新游戏,加载游戏,等等) - SA:MP 应该被加载,而不是显示这些选项。如果你看到“新游戏”,意味着单人游戏,而不是多人模式。
:::
加载为单人游戏可能有 2 个原因; 你将 SA:MP 安装到错误的文件夹,或者你的圣安地列斯版本错误。如果你使用的是错误的版本,你可以使用圣安地列斯降级器来降级你的游戏版本。 点击 [这里](http://grandtheftauto.filefront.com/file/GTA_SA_Downgrader_Patch;74661) 以下载.
有时仍然会显示单人游戏菜单,但实际上 SA:MP 已经正确加载。要解决这个问题,你只需要在菜单上选择一个选项,然后按下 escape(ESC)键退出它。随后 SA:MP 将继续加载。
### 当连接到服务器时,出现错误消息“不可接受的昵称(Unacceptable Nickname)”
确保你的昵称中没有使用任何不允许的字符 (请只使用 0-9,a-z,\[\],(),\$,@,.,\_ 以及 =),同时你的昵称长度不可超过 20 个字符。当其他玩家和你在同一个服务器重名时这,也可能造成此提示。(可能发生在当你在超时或崩溃后快速连接服务器时)。运行 SA:MP 且正常运行时间超过 50 天的 Windows 服务器有时会导致此错误。
### 屏幕上显示“正在连接到 IP:端口…(Connecting to IP:Port...)”
可能是服务器处于脱机状态,再者如果你无法连接到任何服务器,关闭你的防火墙,看看它是否有效。如果有效,你将需要重新配置防火墙。也可能是你正在运行一个过时的 SA:MP 版本 - 你可以在[这里](http://sa-mp.com/download.php)找到新版本。
### 我有一个修改过的 GTA: San Andreas 并且 SA:MP 不会被载入
如果无法加载,请移除你的模组。
### 当通过 SA:MP 启动 GTA 没有反应
将 gta_sa.set 文件从你的用户文件目录中删除,并确保没有安装任何作弊工具/模组。
### 当一辆载具爆炸时,游戏崩溃了
如果你有两个显示器,则有以下三种方法可以解决此问题:
1. 当你玩 SAMP 时,禁用你的第二个显示器。 (如果你喜欢开着显示器,可能不是明智之举。)
2. 将视觉效果质量(Visual FX quality)设置为低(Low)。 (Esc > 选项(Options) > 显示设置(Display Setup) > 高级(Advanced))
3. 重命名你的 侠盗猎车手:圣安地列斯 文件夹 (例如 "侠盗猎车手:圣安地列斯 2") (这通常有效,然而,有时它可能会再次停止工作,所以您需要将它重命名为其他名称。)
### 当我退出暂停菜单后,我的鼠标无法工作
假如你的鼠标在游戏中看起来不能移动,并且在暂停菜单中(部分)可用,你应该禁用多核(multicore)选项[sa-mp.cfg](../../../client/ClientCommands#file-sa-mpcfg "Sa-mp.cfg") (把它设置为 0)。不断地按 Escape 键,直到鼠标再次响应,但这并不是一个完美的解决方案。
### 文件 dinput8.dll 丢失
当 DirectX 安装不正确时,可能会出现这种情况,尝试重新安装它 - 不要忘了重启你的电脑。如果问题仍然出现,只需在 C:\\Windows\\System32 中复制粘贴 dinput.dll 文件到你的圣安地列斯根目录。这样就解决了。
### 我不能看见其他玩家的昵称标签!
请注意,有些服务器可能全局禁用了昵称标签。除此以外,这个问题经常出现在使用英特尔高清集成图形处理器的电脑上(不管怎样,它确实不适合玩游戏)。不幸的是,尚不清楚确切的原因,目前似乎也没有一个普遍的解决方案。假如你有足够的预算,长期的解决方案就是在你的电脑上安装专用的显卡。
| openmultiplayer/web/docs/translations/zh-cn/client/CommonClientIssues.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/client/CommonClientIssues.md",
"repo_id": "openmultiplayer",
"token_count": 3202
} | 466 |
---
title: OnNPCConnect
description: 当NPC成功连接到服务器时会调用该回调。
tags: []
---
## 描述
当 NPC 成功连接到服务器时会调用该回调。
| 参数名 | 描述 |
| ---------- | ------------------------ |
| myplayerid | 已经赋予该 NPC 的玩家 ID |
## 案例
```c
public OnNPCConnect(myplayerid)
{
printf("我成功连接了服务器, ID %i!", myplayerid);
}
```
## 相关回调
- [OnNPCDisconnect](../callbacks/OnNPCDisconnect): 当 NPC 与服务器断开连接时调用。
- [OnPlayerConnect](../callbacks/OnPlayerConnect): 当玩家连接到服务器时调用。
- [OnPlayerDisconnect](../callbacks/OnPlayerDisconnect): 在玩家离开服务器时调用。
| openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnNPCConnect.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnNPCConnect.md",
"repo_id": "openmultiplayer",
"token_count": 407
} | 467 |
---
title: OnPlayerEditAttachedObject
description: 当玩家结束附加物体编辑模式时,会调用此回调。
tags: ["player"]
---
## 描述
当玩家结束附加物体编辑模式时,会调用此回调。
| 参数名 | 描述 |
| -------------- | ------------------------------------------------------- |
| playerid | 结束编辑模式的玩家 ID |
| EDIT_RESPONSE:response | 如果他们取消(Esc),则为 0;如果他们单击保存图标,则为 1 |
| index | 附加物体的索引(0-9) |
| modelid | 已编辑的附加物体的模型 ID |
| boneid | 已编辑的附加物体的骨骼 ID |
| Float:fOffsetX | 已编辑的附加物体的 X 偏移 |
| Float:fOffsetY | 已编辑的附加物体的 Y 偏移量 |
| Float:fOffsetZ | 已编辑的附加物体的 Z 偏移 |
| Float:fRotX | 已编辑的附加物体的 X 向旋转 |
| Float:fRotY | 已编辑的附加物体的 Y 向旋转 |
| Float:fRotZ | 已编辑的附加物体的 Z 向旋转 |
| Float:fScaleX | 已编辑的附加物体的 X 比例 |
| Float:fScaleY | 已编辑的附加物体的 Y 比例 |
| Float:fScaleZ | 已编辑的附加物体的 Z 比例 |
## 返回值
1 - 将阻止其他脚本接收此回调。
0 - 指示此回调将传递给下一个脚本。
它在过滤脚本中总是先被调用。
## 案例
```c
enum attached_object_data
{
Float:ao_x,
Float:ao_y,
Float:ao_z,
Float:ao_rx,
Float:ao_ry,
Float:ao_rz,
Float:ao_sx,
Float:ao_sy,
Float:ao_sz
}
new ao[MAX_PLAYERS][MAX_PLAYER_ATTACHED_OBJECTS][attached_object_data];
// 附加物体时,应将数据存储在上述数组中
public OnPlayerEditAttachedObject(playerid, EDIT_RESPONSE:response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ)
{
if (response)
{
SendClientMessage(playerid, COLOR_GREEN, "已保存附加物体版本。");
ao[playerid][index][ao_x] = fOffsetX;
ao[playerid][index][ao_y] = fOffsetY;
ao[playerid][index][ao_z] = fOffsetZ;
ao[playerid][index][ao_rx] = fRotX;
ao[playerid][index][ao_ry] = fRotY;
ao[playerid][index][ao_rz] = fRotZ;
ao[playerid][index][ao_sx] = fScaleX;
ao[playerid][index][ao_sy] = fScaleY;
ao[playerid][index][ao_sz] = fScaleZ;
}
else
{
SendClientMessage(playerid, COLOR_RED, "未保存附加物体版本。");
new i = index;
SetPlayerAttachedObject(playerid, index, modelid, boneid, ao[playerid][i][ao_x], ao[playerid][i][ao_y], ao[playerid][i][ao_z], ao[playerid][i][ao_rx], ao[playerid][i][ao_ry], ao[playerid][i][ao_rz], ao[playerid][i][ao_sx], ao[playerid][i][ao_sy], ao[playerid][i][ao_sz]);
}
return 1;
}
```
## 要点
:::warning
如果响应为‘0’(已取消),则应丢弃版本。
这必须在使用 EditAttachedObject 之前通过将偏移量等存储在数组中来完成。
:::
## 相关函数
- [EditAttachedObject](../functions/EditAttachedObject): 编辑附加的物体。
- [SetPlayerAttachedObject](../functions/SetPlayerAttachedObject): 将物体附加到玩家。
| openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerEditAttachedObject.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerEditAttachedObject.md",
"repo_id": "openmultiplayer",
"token_count": 2278
} | 468 |
---
title: OnPlayerRequestClass
description: 当玩家在类选择器中改变类时调用(当类选择器第一次出现时)。
tags: ["player"]
---
## 描述
当玩家在类选择器中改变类时调用(当类选择器第一次出现时)。
| 参数名 | 描述 |
| -------- | ------------------------------------------------- |
| playerid | 更换类的玩家 ID。 |
| classid | 正在被查看的当前类的 ID(由 AddPlayerClass 返回)。 |
## 返回值
它在过滤脚本中总是先被调用。
## 案例
```c
public OnPlayerRequestClass(playerid,classid)
{
if (classid == 3 && !IsPlayerAdmin(playerid))
{
SendClientMessage(playerid, COLOR_RED, "此皮肤仅供管理员使用!");
return 0;
}
return 1;
}
```
## 要点
:::tip
当玩家按下 F4 键时,这个回调也会被调用。
:::
## 相关函数
- [AddPlayerClass](../functions/AddPlayerClass): 添加一个玩家类。
| openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerRequestClass.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerRequestClass.md",
"repo_id": "openmultiplayer",
"token_count": 609
} | 469 |
---
title: OnTrailerUpdate
description: 当玩家发送拖车更新时,将调用此回调。
tags: []
---
## 描述
当玩家发送拖车更新时,将调用此回调。
| 参数名 | 描述 |
| --------- | ----------------------- |
| playerid | 发送拖车更新的玩家的 ID |
| vehicleid | 正在更新的拖车的车辆 ID |
## 返回值
0 - 取消对其他玩家的所有拖车更新。将继续向那些发送拖车更新的玩家发送更新。
1 - 正常处理拖车更新,并在所有玩家之间进行同步。
它总是在过滤脚本中先被调用。
## 案例
```c
public OnTrailerUpdate(playerid, vehicleid)
{
DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
return 0;
}
```
## 要点
:::warning
每辆拖车每秒都会频繁地调用这个回调,您应该避免进行密集计算或密集文件写/读操作。
:::
## 相关函数
- [GetVehicleTrailer](../functions/GetVehicleTrailer): 检查车辆牵引的是什么拖车。
- [IsTrailerAttachedToVehicle](../functions/IsTrailerAttachedToVehicle): 检查拖车是否与车辆相连。
- [AttachTrailerToVehicle](../functions/AttachTrailerToVehicle): 将拖车连接到车辆上。
- [DetachTrailerFromVehicle](../functions/DetachTrailerFromVehicle): 将车辆与拖车断开连接。
| openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnTrailerUpdate.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnTrailerUpdate.md",
"repo_id": "openmultiplayer",
"token_count": 777
} | 470 |
---
title: AddSimpleModelTimed
description: 添加新的自定义简单物体模型以供下载。
tags: []
---
<VersionWarnCN version='SA-MP 0.3.DL R1' />
## 描述
添加新的自定义简单物体模型以供下载。模型文件将以 .CRC 格式存储在玩家的 Documents\GTA San Andreas User Files\SAMP\cache 的服务器 IP 和端口的文件夹中。
| 参数名 | 说明 |
| ------------ | -------------------------------------------------------------------------------------------------------------- |
| virtualworld | 使模型可用的虚拟世界 ID。使用-1 表示所有世界。 |
| baseid | 要使用的基本物体模型 ID(下载失败时使用的原始物体)。 |
| newid | 新的物体模型 ID,范围从-1000 到-30000(共 29000 个插槽),稍后将与 CreateObject 或 CreatePlayerObject 一起使用。 |
| dffname | 默认情况下位于服务器的 models 文件夹下的 .dff 模型碰撞文件的名称(artpath 设置)。 |
| txdname | 默认情况下位于服务器的 models 文件夹下的 .txd 模型纹理文件的名称(artpath 设置)。 |
| timeon | 虚拟世界的游戏时间(小时)该物体会出现。 |
| timeoff | 虚拟世界的游戏时间(小时)该物体会消失。 |
## 返回值
1:函数执行成功。
0:函数执行失败。
## 案例
```c
public OnGameModeInit()
{
AddSimpleModelTimed(-1, 19379, -2000, "wallzzz.dff", "wallzzz.txd", 9, 18); // 这面墙只在早上9点到下午6点出现
return 1;
}
```
## 要点
:::tip
必须首先在服务器设置中启用`useartwork`,这样才能在设置虚拟世界时工作,一旦玩家进入特定的世界,模型就会被下载
:::
:::warning
目前还没有限制何时可以调用这个函数,但请注意,如果你没有在 OnFilterScriptInit/OnGameModeInit 中调用它们,你就会面临一些已经在服务器上的玩家可能没有下载模型的风险。
:::
## 相关函数
- [OnPlayerFinishedDownloading](../callbacks/OnPlayerFinishedDownloading): 当玩家下载完成自定义模型时调用。
| openmultiplayer/web/docs/translations/zh-cn/scripting/functions/AddSimpleModelTimed.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/functions/AddSimpleModelTimed.md",
"repo_id": "openmultiplayer",
"token_count": 1661
} | 471 |
---
title: ClearActorAnimations
description: 清除应用在演员身上的任何动画。
tags: []
---
<VersionWarnCN version='SA-MP 0.3.7' />
## 描述
清除应用在演员身上的任何动画。
| 参数名 | 说明 |
| ------- | ---------------------------------------------- |
| actorid | 要清除动画的演员的 ID。(由 CreateActor 返回) |
## 返回值
1:函数执行成功。
0:函数执行失败,传入的演员不存在。
## 案例
```c
new gMyActor;
public OnGameModeInit()
{
gMyActor = CreateActor(...);
}
// 其他地方
ApplyActorAnimation(gMyActor, ...);
// 其他地方
ClearActorAnimations(gMyActor);
```
## 相关函数
- [ApplyActorAnimation](ApplyActorAnimation): 将动画应用于演员。
| openmultiplayer/web/docs/translations/zh-cn/scripting/functions/ClearActorAnimations.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/functions/ClearActorAnimations.md",
"repo_id": "openmultiplayer",
"token_count": 417
} | 472 |
---
title: Kick
description: 将玩家踢出服务器。如果他想继续玩,就必须退出游戏并重新连接。
tags: ["管理员"]
---
## 描述
将玩家踢出服务器。如果他想继续玩,就必须退出游戏并重新连接。
| 参数名 | 说明 |
| -------- | ----------------------- |
| playerid | 要踢出服务器的玩家 ID。 |
## 返回值
这个函数总是返回 1,即使函数执行失败(指定的玩家不存在)。
## 要点
:::warning
从 SA-MP 0.3x 开始,在 Kick() 之前的任何发送给玩家的代码(比如用 SendClientMessage 发送消息)都不会送达给玩家。必须使用计时器来延迟封禁玩家。
:::
## 案例
```c
// 为了在连接关闭前给玩家显示一条信息(例如原因),你必须使用一个计时器来创建一个延迟,这个延迟只需要几毫秒的时间。
// 这里的案例为了安全起见,延迟了整整一秒钟。
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext, "/kickme", true) == 0)
{
// 踢出执行这个命令的玩家。
// 首先,给他发个消息。
SendClientMessage(playerid, 0xFF0000FF, "你被踢了!");
// 实际上是在一秒钟后用计时器踢的他。
SetTimerEx("DelayedKick", 1000, false, "i", playerid);
return 1;
}
return 0;
}
forward DelayedKick(playerid);
public DelayedKick(playerid)
{
Kick(playerid);
return 1;
}
```
## 相关函数
- [Ban](Ban): 封禁目前在服务器中的某个玩家。
- [BanEx](BanEx): 以某个原因封禁玩家。
| openmultiplayer/web/docs/translations/zh-cn/scripting/functions/Kick.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/functions/Kick.md",
"repo_id": "openmultiplayer",
"token_count": 1020
} | 473 |
---
title: "延迟补偿"
description: 延迟补偿说明.
---
自 0.3z 起,SA-MP 服务器默认启用武器开火的延迟补偿。 它可以使用 [server.cfg](server.cfg) 中的 `lagcompmode` 服务器变量进行切换。 将其设置为 0 将完全禁用延迟补偿,玩家将必须提前射击(在目标之前射击)。
禁用延迟补偿将阻止调用 [OnPlayerWeaponShot](../scripting/callbacks/OnPlayerWeaponShot)。
此变量只能在 [server.cfg](server.cfg) 中设置。
| openmultiplayer/web/docs/translations/zh-cn/server/LagCompensation.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/server/LagCompensation.md",
"repo_id": "openmultiplayer",
"token_count": 299
} | 474 |
---
title: 10,000 Members!
date: "2021-07-16T02:51:00"
author: Potassium
---
Hey everyone!
We reached an amazing milestone recently: we officially hit 10,000 USERS in our Discord! 🥳🔟🥳
We thought we would take this opportunity to give a small update as we know it's been a while and everyone is wondering what's going on!
As all of the dev team has full-time jobs and other commitments, we have all really been messed around with the COVID situation. That means that we have not had much time to dedicate to open.mp for a while now.
But things have picked up again recently, we are still alive, the project is truly moving along faster than ever, and we have made more progress in the last few weeks than we have in a long time!
We are so proud of the work going into this, and of the amazing refined team we have.
We will give more detailed info in the coming months, but we just wanted to make sure everyone knows we have not abandoned open.mp, the passion is still there, and we are doing the best we can. So please stick with us as we will have some news and some screenshots and videos very soon!
In the meantime, come hang out with us on Discord! Thank you to all 10,000+ of you 🥰
Our Discord server is a warm and welcoming spot for players and friends of ALL San Andreas multiplayer mods and communities! Some of the things we promote are:
✅ Community: Hang out with the regulars, meet new people, find old friends and veteran players, find people from your country/region in the language-specific channels, meet people from SA-MP / MTA / other multiplayer mods
✅ Scripting: Learn to script, get help with your scripts, help others
✅ Server advertisements: Show off your SA-MP server in the dedicated channels
✅ Programming and tech: Discuss and get help with other programming languages and software development, tech support, meet other like-minded people to work with
✅ Gaming: Find people to play games with (not just SA!), discuss gaming news and updates
✅ Showcase: Are you a YouTuber? Streamer? Artist? Make cool music? Are you a chef? Maybe you fish? Or build cars? Whatever you're proud of, show it off!
✅ open.mp: Stay up to date with the latest open.mp development progress and GitHub movements, hang out with the team, watch our Discord VIP-exclusive dev streams when they are back up and running!
| openmultiplayer/web/frontend/content/en/blog/10k-members.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/en/blog/10k-members.mdx",
"repo_id": "openmultiplayer",
"token_count": 574
} | 475 |
---
title: Forum and Wiki offline
description: Wondering why the SA-MP Forum and Wiki are offline? Read this for information and next steps.
---
# Why are the Forum and Wiki offline?
On the 25th of September 2020, the certificate for both forum.sa-mp.com and wiki.sa-mp.com expired. Many users noticed this and brought the issue up on the Discord.
Though the site was still accessible by bypassing the security of HTTPS, it was obvious that something bigger was amiss.
The next day, users found both sites to be completely offline with database errors displayed in the browser.

Now, this error is fairly common, it usually indicates a database backup. But given the SSL certificate incident, it seemed indicative of something else.
Later that day, the sites both went completely offline, not even responding with an error page.

## What does this mean?
There's a lot of speculation in the SA-MP community but no official word of what's happened. As we've learned in the past, however, it's best to assume the worst.
The Forum and the Wiki are probably not coming back. It would be great to be wrong about that.
## Alternatives
For now, the wiki content is still accessible using [the Archive.org copies](http://web-old.archive.org/web/20200314132548/https://wiki.sa-mp.com/wiki/Main_Page).
This is obviously not a great long-term solution. These pages take a long time to load and it stresses the Archive.org's service (which is already underfunded and a very important part of internet history).
[The recovered SA-MP Wiki](/docs) is a great modern alternative. It uses Markdown and is hosted using GitHub and Vercel. We urge users to contribute as much as they can to helping transfer all the existing wiki pages over to the new wiki. You can find out more here: https://github.com/openmultiplayer/wiki/issues/27
| openmultiplayer/web/frontend/content/en/missing-sites.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/en/missing-sites.mdx",
"repo_id": "openmultiplayer",
"token_count": 520
} | 476 |
# Open Multiplayer
Sebuah mod multipemain yang akan datang untuk _Grand Theft Auto: San Andreas_ yang nantinya akan sepenuhnya kompatibel dengan mod multipemain yang sudah ada di _San Andreas Multiplayer._
<br />
Ini nantinya **SA:MP client dan semua script SA:MP yang sudah ada dapat bekerja dengan open.mp** dan, selain itu juga, banyak bugs yang diperbaiki dalam perangkat lunak server tanpa perlu peretasan ataupun penyelesaian masalah.
Jika kamu ingin tau kapan perilisan publik direncanakan atau bagaimana kamu dapat berkontribusi pada proyek ini, silahkan lihat [forum thread ini](https://forum.open.mp/showthread.php?tid=99) untuk informasi lebih lanjut.
# [FAQ](/faq)
| openmultiplayer/web/frontend/content/id/index.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/id/index.mdx",
"repo_id": "openmultiplayer",
"token_count": 255
} | 477 |
---
title: 10,000 Kullanıcı!
date: "2021-07-16T02:51:00"
author: Potassium
---
Herkese merhaba!
Son zamanlarda inanılmaz bir kilometre taşına ulaştık: Discord'ta resmi olarak 10,000 KULLANICI sayısına ulaştık! 🥳🔟🥳
Biliyoruz ki bir süredir ses vermediğimiz için ve herkesin neler olup bittiğini merak ettiği bir dönemde, küçük bir güncelleme yapma fırsatını değerlendirmek istedik!
Tüm geliştirici ekibimiz tam zamanlı işlere ve diğer sorumluluklara sahip olduğundan, COVID durumuyla gerçekten başa çıkmak zorunda kaldık. Bu da, bir süredir open.mp'ye pek fazla zaman ayıramadığımız anlamına geliyor.
Ancak son zamanlarda işler tekrar hareketlenmeye başladı, hala hayatta ve proje gerçekten daha önce hiç olmadığı kadar hızlı ilerliyor. Son birkaç haftadır uzun bir süredir yapmadığımız kadar ilerleme kaydettik!
Bu konuda yapılan işe ve sahip olduğumuz muhteşem geliştirici ekibimize gurur duyuyoruz.
Gelecek aylarda daha detaylı bilgi vereceğiz, ancak herkesin open.mp'yi terk etmediğimizi, tutkunun hala var olduğunu ve elimizden gelenin en iyisini yapmaya çalıştığımızı bilmesini istedik. Lütfen bizimle kalın, çünkü çok yakında bazı haberler ve ekran görüntüleri ile videolarımız olacak!
Bu arada, Discord'ta bizimle takılın! Siz 10,000+'ye teşekkür ediyoruz 🥰
Discord sunucumuz, tüm San Andreas çok oyunculu modları ve topluluklarının oyuncuları ve arkadaşları için sıcak ve hoş bir yerdir! Promosyon yaptığımız bazı şeyler şunlar:
✅ Topluluk: Topluluğun üyeleriyle takılın, yeni insanlarla tanışın, eski arkadaşlarınızı ve deneyimli oyuncuları bulun, dil özel kanallarında ülkeniz/bölgenizden insanlarla tanışın, SA-MP / MTA / diğer çok oyunculu modlardan insanlarla tanışın
✅ Kodlama: Kod yazmayı öğrenin, kodlamalarınızda yardım alın, başkalarına yardımcı olun
✅ Sunucu reklamları: SA-MP sunucunuzu özel kanallarda sergileyin
✅ Programlama ve teknoloji: Diğer programlama dilleri ve yazılım geliştirme konularında tartışın ve yardım alın, teknik destek, başka düşünen insanlarla tanışın ve çalışın
✅ Oyun: Oyun oynamak için insanlar bulun (sadece SA değil!), oyun haberleri ve güncellemelerini tartışın
✅ Sergi: YouTuber mısınız? Yayıncı mısınız? Sanatçı mısınız? Güzel müzik mi yapıyorsunuz? Şef misiniz? Belki balık mı tutuyorsunuz? Veya arabalar mı yapıyorsunuz? Neyle gurur duyuyorsanız, gösterin!
✅ open.mp: En son open.mp gelişme ilerlemeleri ve GitHub hareketleri hakkında bilgi edinin, ekibimizle takılın, Discord VIP özel geliştirici yayınlarımızı izleyin (ne zaman yeniden başladılarsa)!
| openmultiplayer/web/frontend/content/tr/blog/10k-members.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/tr/blog/10k-members.mdx",
"repo_id": "openmultiplayer",
"token_count": 1260
} | 478 |
# Open Multiplayer
Прийдешня мультиплеєрна модифікація до _Grand Theft Auto: San Andreas_, яка буде повністю зворотно сумісною з існуючою мультіплеєрною модифікацією, відомою як _San Andreas Multiplayer._
<br />
Це означає, **що існуючий клієнт SA:MP і всі скрипти будуть працювати з open.mp,** а також багато помилок в серверній частині мультиплеєра будуть виправлені без необхідності створювати тимчасові рішення.
Якщо Ви зацікавлені новинами про публічний реліз або хочете внести свій внесок у розвиток проекту, перейдіть на [цю сторінку форуму](https://forum.open.mp/showthread.php?tid=99) для вивчення подальшої інформації.
# [FAQ](/faq)
# [Офіційний форум](/forum)
| openmultiplayer/web/frontend/content/uk/index.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/uk/index.mdx",
"repo_id": "openmultiplayer",
"token_count": 664
} | 479 |
# Open Multiplayer
這是一個 _俠盜獵車手 : 聖安地列斯_ 的多人連線模組,並且與當前的多人連線模組 _San Andreas Multiplayer_ 有著完全的兼容性。
<br />
這代表 **現有的 SA:MP 客戶端以及所有的伺服器腳本完全可以使用在 open.mp 上** ,且伺服器的 bug 將會得到修正,不需要再從腳本或是另外使用插件修正。
若您對該項目有興趣,想知道何時發布,或是想要幫助開發,請查看 <a href="https://forum.open.mp/showthread.php?tid=99">這篇討論區文章</a> 以獲得更多資訊。
# [問答集](/faq)
| openmultiplayer/web/frontend/content/zh-tw/index.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/zh-tw/index.mdx",
"repo_id": "openmultiplayer",
"token_count": 389
} | 480 |
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="200"
height="80"
viewBox="0 0 52.916666 21.166666"
version="1.1"
id="svg8"
inkscape:version="0.92.3 (2405546, 2018-03-11)"
sodipodi:docname="widget-black.svg">
<defs
id="defs2">
<style
id="style6109">.cls-1{fill:#fff;}.cls-1,.cls-2,.cls-4{stroke:#000;stroke-width:20px;}.cls-1,.cls-3,.cls-4{stroke-linejoin:round;}.cls-2,.cls-3,.cls-4{fill:none;}.cls-2{stroke-linecap:round;stroke-miterlimit:10;}.cls-3{stroke:#fff;stroke-width:50px;}</style>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.4"
inkscape:cx="108.82682"
inkscape:cy="123.27493"
inkscape:document-units="mm"
inkscape:current-layer="layer2"
showgrid="false"
inkscape:pagecheckerboard="true"
inkscape:snap-text-baseline="false"
inkscape:window-width="1920"
inkscape:window-height="1052"
inkscape:window-x="1920"
inkscape:window-y="0"
inkscape:window-maximized="1"
units="px" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Background"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-275.83334)"
sodipodi:insensitive="true">
<rect
style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#282828;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
id="rect815"
width="52.916668"
height="21.166666"
x="2.8055057e-08"
y="275.83334"
ry="3.200458" />
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="openmp-logo"
transform="translate(0,-58.833338)"
sodipodi:insensitive="true">
<path
style="fill:none;stroke:#ffffff;stroke-width:0.50990957px;stroke-linecap:round;stroke-miterlimit:10;stroke-opacity:1"
inkscape:connector-curvature="0"
class="cls-2"
d="m 5.4949094,70.197847 v -2.76371 c 0,-0.130537 0.073427,-0.203964 0.2039639,-0.203964 h 0.8158554 c 0.1305366,0 0.2039638,0.07343 0.2039638,0.203964 v 0.166486 c 0.1868818,-0.28249 0.5119492,-0.484414 0.9382337,-0.484414 0.411752,0 0.7393688,0.166485 0.9458822,0.485688 0.2643881,-0.282999 0.604243,-0.485688 1.093756,-0.485688 v 0 c 0.7995386,0 1.2645766,0.50583 1.2645766,1.444063 v 2.545469"
id="path6117" />
<path
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:0.50990957px;stroke-linejoin:round;stroke-opacity:1"
inkscape:connector-curvature="0"
class="cls-4"
d="m 5.4949094,70.605775 v -0.815856 a 0.20396384,0.20396384 0 0 1 0.2039639,-0.203963 h 0.8158554 a 0.20396384,0.20396384 0 0 1 0.2039638,0.203963 v 0.815856 A 0.20396384,0.20396384 0 0 1 6.5147287,70.809739 H 5.6988733 A 0.20396384,0.20396384 0 0 1 5.4949094,70.605775 Z"
id="path6121" />
<path
style="fill:none;stroke:#ffffff;stroke-width:0.50990957px;stroke-linecap:round;stroke-miterlimit:10;stroke-opacity:1"
inkscape:connector-curvature="0"
class="cls-2"
d="m 11.752775,72.737197 v -5.30306 c 0,-0.130537 0.07343,-0.203964 0.203964,-0.203964 h 0.815855 c 0.130537,0 0.203964,0.07343 0.203964,0.203964 v 0.176939 c 0.272292,-0.310535 0.669512,-0.495122 1.215625,-0.495122 1.06877,0 1.949894,0.938233 1.949894,2.153858 0,1.215624 -0.881124,2.153858 -1.949894,2.153858 -0.546113,0 -0.943333,-0.184078 -1.215625,-0.495122 v 1.808649"
id="path6123" />
<circle
style="fill:none;stroke:#ffffff;stroke-width:0.50990957px;stroke-linejoin:round;stroke-opacity:1"
class="cls-4"
cx="10.70644"
cy="69.416664"
id="circle6125"
r="6.4827356" />
</g>
<g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="text"
transform="translate(0,-58.833338)"
sodipodi:insensitive="true">
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.36020827px;line-height:1.29999995;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.07000434"
x="21.17651"
y="68.159538"
id="text6144"><tspan
sodipodi:role="line"
x="21.17651"
y="68.159538"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.36020827px;line-height:1.29999995;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke-width:0.07000434"
id="tspan6148">This server will</tspan><tspan
sodipodi:role="line"
x="21.17651"
y="72.527809"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.36020827px;line-height:1.29999995;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke-width:0.07000434"
id="tspan6152">run on open.mp!</tspan><tspan
sodipodi:role="line"
x="21.17651"
y="76.89608"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.36020827px;line-height:1.29999995;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke-width:0.07000434"
id="tspan6146" /></text>
</g>
</svg>
| openmultiplayer/web/frontend/public/images/assets/widget-black.svg/0 | {
"file_path": "openmultiplayer/web/frontend/public/images/assets/widget-black.svg",
"repo_id": "openmultiplayer",
"token_count": 3384
} | 481 |
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 50 50" style="enable-background:new 0 0 50 50;" xml:space="preserve">
<style type="text/css">
.st0{fill:#7466D4;}
</style>
<path class="st0" d="M9,4C6.2,4,4,6.2,4,9v32c0,2.8,2.2,5,5,5h32c2.8,0,5-2.2,5-5V9c0-2.8-2.2-5-5-5H9z M15,8h2.4l1.6,4l1.6-4H23
l-3,7v4h-2v-4C17.4,13.4,15.4,9,15,8z M25,11c0.9,0,1.8,0.3,2.3,0.9c0.4,0.5,0.7,1.3,0.7,2.3v1.5c0,1-0.2,1.8-0.6,2.2
c-0.6,0.7-1.5,1-2.4,1s-1.8-0.3-2.4-1c-0.4-0.5-0.6-1.2-0.6-2.2v-1.5c0-1,0.2-1.8,0.7-2.3C23.2,11.3,24,11,25,11z M29,11h2v6
c0,0.3,0.3,0.4,0.6,0.4c0.4,0,0.9-0.5,1.4-1V11h2v8h-2v-1.4c-0.8,0.8-1.5,1.4-2.4,1.4c-0.7,0-1.1-0.3-1.3-0.7
C29.1,18,29,17.5,29,16.8V11z M25,12.6c-0.1,0-0.3,0-0.4,0.1s-0.2,0.1-0.3,0.2c-0.1,0.1-0.2,0.2-0.2,0.3C24,13.4,24,13.5,24,13.6
v2.8c0,0.3,0.1,0.5,0.3,0.7c0.1,0.1,0.2,0.2,0.3,0.2c0.1,0.1,0.3,0.1,0.4,0.1s0.3,0,0.4-0.1c0.4-0.2,0.6-0.5,0.6-0.9v-2.8
C26,13.1,25.5,12.6,25,12.6z M25,22L25,22c0,0,6.7,0,11.2,0.3c0.6,0.1,2,0.1,3.2,1.3c1,0.9,1.3,3.1,1.3,3.1s0.3,1.5,0.3,4.1v2.4
c0,2.5-0.3,4.1-0.3,4.1s-0.3,2.2-1.3,3.1c-1.2,1.2-2.6,1.3-3.2,1.3C31.7,42,25,42,25,42s-8.3-0.1-10.9-0.3c-0.7-0.1-2.3-0.1-3.5-1.3
c-1-1-1.3-3.1-1.3-3.1S9,35.7,9,33.2v-2.4c0-2.5,0.3-4.1,0.3-4.1s0.3-2.2,1.3-3.1c1.2-1.2,2.6-1.3,3.2-1.3C18.3,22,25,22,25,22z
M12,26v2h2v10h2V28h2v-2H12z M25,26v12h2v-1.2c0.6,0.8,1.5,1.2,2.1,1.2c0.8,0,1.4-0.4,1.7-1.2c0.1-0.4,0.2-0.8,0.2-1.7v-2.8
c0-1-0.1-1.7-0.3-2.2c-0.3-0.8-0.9-1.2-1.6-1.2c-1,0-1.4,0.5-2.1,1.4V26H25z M18,29v6.7c0,0.7,0.1,1.2,0.2,1.5
c0.2,0.5,0.7,0.8,1.3,0.8c0.7,0,1.7-0.5,2.5-1.4V38h2v-9h-2v6.3c-0.4,0.6-1.1,1-1.5,1c-0.3,0-0.5-0.1-0.5-0.4V29H18z M35,29
c-1,0-1.8,0.3-2.4,0.9C32.2,30.4,32,31.1,32,32v3.1c0,0.9,0.3,1.6,0.7,2c0.6,0.6,1.4,0.9,2.4,0.9c1,0,1.8-0.3,2.4-0.9
c0.2-0.3,0.4-0.6,0.5-0.9c0-0.2,0.1-0.6,0.1-1.1h-2v0.8c0,0.5-0.4,0.8-1,0.8s-1-0.4-1-0.8V34h4v-0.6V32c0-0.9-0.2-1.6-0.6-2.1
C36.8,29.3,36,29,35,29z M35,30.4c0.6,0,1,0.4,1,0.8v1.3h-2v-1.3C34,30.8,34.4,30.4,35,30.4z M28.2,30.7c0.5,0,0.8,0.3,0.8,1.4v2.8
c0,1-0.2,1.4-0.8,1.4c-0.3,0-0.9-0.2-1.2-0.5v-4.4C27.3,31.1,27.9,30.7,28.2,30.7z"/>
</svg>
| openmultiplayer/web/frontend/public/images/assets/youtube.svg/0 | {
"file_path": "openmultiplayer/web/frontend/public/images/assets/youtube.svg",
"repo_id": "openmultiplayer",
"token_count": 1933
} | 482 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.