text
stringlengths 1
2.83M
| id
stringlengths 16
152
| metadata
dict | __index_level_0__
int64 0
949
|
---|---|---|---|
---
title: GangZoneShowForPlayer
description: Prikaži gang zonu za igrača.
tags: ["player", "gangzone"]
---
## Deskripcija
Prikaži gang zonu za igrača. Prvo mora biti kreirana sa GangZoneCreate.
| Ime | Deskripcija |
| -------- | -------------------------------------------------------------------------------------------------------- |
| playerid | ID igrača kojem želite prikazati gangzonu. |
| zone | ID gang zone koju želite prikazati igrači. Returnovana/vraćena od GangZoneCreate |
| color | Boja za bljeskanje gangzone, kao cijeli broj ili hex u RGBA formatu boja. Podržana alfa transparentnost. |
## Returns
1 ako je gangzona prikazana, usotalom 0 (ne postoji).
## Primjeri
```c
new gGangZoneId;
public OnGameModeInit()
{
gGangZoneId = GangZoneCreate(1082.962, -2787.229, 2942.549, -1859.51);
return 1;
}
public OnPlayerSpawn(playerid)
{
GangZoneShowForPlayer(playerid, gGangZoneId, 0xFFFF0096);
return 1;
}
```
## Srodne Funkcije
- [GangZoneCreate](GangZoneCreate): Kreiraj gangzonu.
- [GangZoneDestroy](GangZoneDestroy): Uništi gang zonu.
- [GangZoneShowForPlayer](GangZoneShowForPlayer): Prikaži gang zonu za igrača.
- [GangZoneHideForPlayer](GangZoneHideForPlayer): Sakrij gangzonu za igrača.
- [GangZoneHideForAll](GangZoneHideForAll): Sakrij gangzonu za sve igrače.
- [GangZoneFlashForPlayer](GangZoneFlashForPlayer): Kreiraj bljeskalicu gang zone za igrača.
- [GangZoneFlashForAll](GangZoneFlashForAll): Kreiraj bljeskalicu gang zone za sve igrače.
- [GangZoneStopFlashForPlayer](GangZoneStopFlashForPlayer): Zaustavi gang zonu da bljeska za igrača.
- [GangZoneStopFlashForAll](GangZoneStopFlashForAll): Zaustavi gang zonu da bljeska za sve igrače.
| openmultiplayer/web/docs/translations/bs/scripting/functions/GangZoneShowForPlayer.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/GangZoneShowForPlayer.md",
"repo_id": "openmultiplayer",
"token_count": 847
} | 351 |
---
title: GetNetworkStats
description: Funkcija koja dobiva mrežne statistike servera i pohranjuje ih u string (niz).
tags: []
---
## Deskripcija
Funkcija koja dobiva mrežne statistike servera i pohranjuje ih u string (niz).
| Ime | Deskripcija |
| ----------- | ------------------------------------------------------------------------ |
| retstr[] | Niz (string) za pohranjivanje mrežne statistike, proslijeđen referencom. |
| retstr_size | Dužina stringa (niza) koji se pohranjuje. |
## Returns
Ova funkcija uvijek returna (vraća) 1.
## Primjeri
```c
public OnPlayerCommandText(playerid,cmdtext[])
{
if (!strcmp(cmdtext, "/netstats"))
{
new stats[400+1];
GetNetworkStats(stats, sizeof(stats)); // funkcija pomoću koje dobivamo mrežne statistike servera
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Server Network Stats", stats, "Close", "");
}
return 1;
}
```
```
Server Ticks: 200
Messages in Send buffer: 0
Messages sent: 142
Bytes sent: 8203
Acks sent: 11
Acks in send buffer: 0
Messages waiting for ack: 0
Messages resent: 0
Bytes resent: 0
Packetloss: 0.0%
Messages received: 54
Bytes received: 2204
Acks received: 0
Duplicate acks received: 0
Inst. KBits per second: 28.8
KBits per second sent: 10.0
KBits per second received: 2.7
```
## Srodne Funkcije
- [GetPlayerNetworkStats](GetPlayerNetworkStats): Ova funkcija dobiva mrežne statistike igrača i sprema ih u string (niz).
- [NetStats_GetConnectedTime](NetStats_GetConnectedTime): Dobij vrijeme za koje je igrač povezan.
- [NetStats_MessagesReceived](NetStats_MessagesReceived): Dobij broj mrežnih poruka koje je server primio od igrača.
- [NetStats_BytesReceived](NetStats_BytesReceived): Dobij količinu informacija (u bajtovima) koju je server primio od igrača.
- [NetStats_MessagesSent](NetStats_MessagesSent): Dobij broj mrežnih poruka koje je server poslao igraču.
- [NetStats_BytesSent](NetStats_BytesSent): Dobij količinu informacija (u bajtovima) koju je server poslao igraču.
- [NetStats_MessagesRecvPerSecond](NetStats_MessagesRecvPerSecond): Dobij broj mrežnih poruka koje je server primio od igrača u posljednjoj sekundi.
- [NetStats_PacketLossPercent](NetStats_PacketLossPercent): Dobij procenat gubitka paketa (packet loss) igrača.
- [NetStats_ConnectionStatus](NetStats_ConnectionStatus): Dobij status veze igrača.
- [NetStats_GetIpPort](NetStats_GetIpPort): Dobij IP i port igrača.
| openmultiplayer/web/docs/translations/bs/scripting/functions/GetNetworkStats.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/GetNetworkStats.md",
"repo_id": "openmultiplayer",
"token_count": 1020
} | 352 |
---
title: GetPlayerTargetPlayer
description: Provjeri na koga igrač cilja.
tags: ["player"]
---
## Deskripcija
Provjeri na koga igrač cilja.
| Ime | Deskripcija |
| -------- | ------------------------------- |
| playerid | ID igrača na kojeg igrač cilja. |
## Returns
ID ciljanog igrača, ili INVALID_PLAYER_ID ako ga nema.
## Primjeri
```c
public OnPlayerUpdate(playerid)
{
// Store the ID
new playerTarDobij ID = GetPlayerTargetPlayer(playerid);
if (playerTarDobij ID != INVALID_PLAYER_ID && GetPlayerTeam(playerTarDobij ID) == GetPlayerTeam(playerid))
{
GameTextForPlayer(playerid, "~R~ne pucaj na saigrače!", 5000, 3);
}
}
```
## Zabilješke
:::warning
Ne radi za joypad/kontrolere i nakon određene udaljenosti. Ne radi za snajpersku pušku, jer se ništa ne zaključava i kao takva ne može i neće vratiti igrača.
:::
## Srodne Funkcije
- [GetPlayerCameraFrontVector](GetPlayerCameraFrontVector): Dobij prednji vektor kamere igrača.
- [OnPlayerGiveDamage](../callbacks/OnPlayerGiveDamage): Ovaj callback je pozvan kada igrač daje ozljede.
- [OnPlayerTakeDamage](../callbacks/OnPlayerTakeDamage): Ovaj callback je pozvan kada igrač prima ozljede.
| openmultiplayer/web/docs/translations/bs/scripting/functions/GetPlayerTargetPlayer.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/GetPlayerTargetPlayer.md",
"repo_id": "openmultiplayer",
"token_count": 499
} | 353 |
---
title: GetSVarType
description: Dobija tip (cijeli broj, float or string) server varijable.
tags: []
---
## Deskripcija
Dobija tip (cijeli broj, float or string) server varijable.
| Ime | Deskripcija |
| ------- | ----------------------------------- |
| varname | Ime server varijable za dobiti tip. |
## Returns
Returna/vraća tip SVar-a. Pogledaj tabelu ispod.
## Primjeri
```c
stock PrintSVar(varname[])
{
switch(GetSVarType(varname))
{
case SERVER_VARTYPE_NONE:
{
return 0;
}
case SERVER_VARTYPE_INT:
{
printf("Cjelobrojni 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;
}
```
## Srodne Funkcije
- [SetSVarInt](SetSVarInt): Postavite cijeli broj za varijablu servera.
- [GetSVarInt](GetSVarInt): Dobij cjelobrojnu vrijednost server varijable.
- [SetSVarString](SetSVarString): Postavite string za server varijablu.
- [GetSVarString](GetSVarString): Dobij prethodno postavljeni string iz server varijable.
- [SetSVarFloat](SetSVarFloat): Postavi float za server varijablu.
- [GetSVarFloat](GetSVarFloat): Dobij prethodno postavljeni float iz server varijable.
- [DeleteSVar](DeleteSVar): Obriši server varijablu.
| openmultiplayer/web/docs/translations/bs/scripting/functions/GetSVarType.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/GetSVarType.md",
"repo_id": "openmultiplayer",
"token_count": 744
} | 354 |
---
title: GetVehicleParamsEx
description: Gets a vehicle's parameters.
tags: ["vehicle"]
---
## Deskripcija
Gets a vehicle's parameters.
| Ime | Deskripcija |
| ----------------- | ------------------------------------------------------------------------------ |
| vehicleid | ID vozila za dobiti parametre. |
| & motor | Doznajte status motora. Ako je 1, motor radi. |
| i svjetla | Doznajte stanje svjetla u vozilu. Ako je 1 svjetla upaljena. |
| & alarm | Doznajte stanje alarma u vozilu. Ako je 1 alarm se oglašava (ili se oglašava). |
| i vrata | Dobiti status zaključavanja vrata. Ako su 1 vrata su zaključana. |
| & poklopac motora | Dobiti status poklopca motora / poklopca motora. Ako je 1, otvoreno je. |
| & boot | Dobiti status pokretanja / prtljažnika. 1 znači da je otvoren. |
| & cilj | Steknite objektivni status. 1 znači da je cilj uključen. |
## Returns
1 - uspješno
0 - greška (nevažeći ID vozila).
Parametri vozila pohranjeni su u referentnim varijablama, a ne u povratnoj vrijednosti.
## Primjeri
```c
new
engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
//To bi uzrokovalo da sva gore navedena varijabla postane status subjekta.
```
## Zabilješke
:::tip
Ako se parametar ne postavi (SetVehicleParamsEx se prethodno nije koristio), vrijednost će biti -1 ('unset').
:::
## Srodne Funkcije
- [SetVehicleParamsEx](SetVehicleParamsEx): Postavlja parametre vozila za sve igrače.
| openmultiplayer/web/docs/translations/bs/scripting/functions/GetVehicleParamsEx.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/GetVehicleParamsEx.md",
"repo_id": "openmultiplayer",
"token_count": 910
} | 355 |
---
title: IsActorInvulnerable
description: Provjerite je li aktor neranjiv.
tags: []
---
:::warning
Ova funkcija je dodana u SA-MP 0.3.7 i ne radi u nižim verzijama!
:::
## Deskripcija
Provjerite je li aktor neranjiv.
| Ime | Deskripcija |
| ------- | ------------------------ |
| actorid | ID aktora za provjeriti. |
## Returns
1: Aktor je neranjiv.
0: Aktor je ranjiv.
## Primjeri
```c
new gMyActor;
public OnGameModeInit()
{
gMyActor = CreateActor(179, 316.1, -134.0, 999.6, 90.0); // Aktor kao prodavač u Ammunation-u
if (IsActorInvulnerable(gMyActor))
{
print("Aktor je neranjiv.");
}
else
{
print("Aktor je ranjiv.");
}
return 1;
}
```
## Srodne Funkcije
- [CreateActor](CreateActor): Kreiraj aktora (statičnog NPC-a).
- [SetActorInvulnerable](SetActorInvulnerable): Postavi aktoru neranjivost.
- [SetActorHealth](SetActorHealth): Postavi zdravlje aktoru.
| openmultiplayer/web/docs/translations/bs/scripting/functions/IsActorInvulnerable.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/IsActorInvulnerable.md",
"repo_id": "openmultiplayer",
"token_count": 411
} | 356 |
---
title: IsPlayerStreamedIn
description: Provjerava ako je igrač učitan u klijent drugog igrača.
tags: ["player"]
---
## Deskripcija
Provjerava ako je igrač učitan u klijent drugog igrača.
| Ime | Deskripcija |
| ----------- | -------------------------------------------------------------------- |
| playerid | ID igrača kojeg želite provjeriti da li je učitan. |
| forplayerid | ID igrača kojeg želite provjeriti je li prvi igrač učitan kod njega. |
## Returns
1: Igrač je učitan.
0: Igrač nije učitan.
## Primjeri
```c
if (IsPlayerStreamedIn(playerid, 0))
{
SendClientMessage(playerid, -1, "ID 0 te može vidjeti.");
}
```
## Zabilješke
:::tip
Igrači nestaju ako su udaljeni više od 150 metara (vidi server.cfg - stream_distance)
:::
:::warning
Igrači se ne prenose putem vlastitog klijenta (nisu učitani u vlastitom klijentu), pa ako je playerid isti kao forplayerid, vratit će se false!
:::
## Srodne Funkcije
- [IsActorStreamedIn](IsActorStreamedIn): Provjeri da li je aktor učitan kod igrača.
- [IsVehicleStreamedIn](IsVehicleStreamedIn): Provjerava ako je vozilo učitano za igrača.
- [OnPlayerStreamIn](../callbacks/OnPlayerStreamIn): Pozvano kada se igrač učita za drugog igrača.
- [OnPlayerStreamOut](../callbacks/OnPlayerStreamOut): Pozvano kada se igrač iščita za drugog igrača.
- [OnVehicleStreamIn](../callbacks/OnVehicleStreamIn): Pozvano kada se vozilo učita za igrača.
- [OnVehicleStreamOut](../callbacks/OnVehicleStreamOut): Pozvano kada se vozilo iščita za igrača.
| openmultiplayer/web/docs/translations/bs/scripting/functions/IsPlayerStreamedIn.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/IsPlayerStreamedIn.md",
"repo_id": "openmultiplayer",
"token_count": 693
} | 357 |
---
title: NetStats_BytesReceived
description: Gets the amount of data (in bytes) that the server has received from the player.
tags: []
---
## Deskripcija
Gets the amount of data (in bytes) that the server has received from the player.
| Ime | Deskripcija |
| -------- | ---------------------------- |
| playerid | ID igrača za dobiti podatke. |
## Returns
This function returns the number of bytes the server has received from the player. 0 is returned if the Igrač nije konektovan.
## Primjeri
```c
public OnPlayerCommandText(playerid,cmdtext[])
{
if (!strcmp(cmdtext, "/bytesreceived"))
{
new szString[144];
format(szString, sizeof(szString), "You have sent %i bytes of information to the server.", NetStats_BytesReceived(playerid));
SendClientMessage(playerid, -1, szString);
}
return 1;
}
```
## Srodne Funkcije
- [GetPlayerNetworkStats](GetPlayerNetworkStats): Dobija mrežne statistike igrača i pohranjuje ih u string.
- [GetNetworkStats](GetNetworkStats): Dobija mrežne statistike servera i sprema ih u string.
- [NetStats_GetConnectedTime](NetStats_GetConnectedTime): Dobij vrijeme za kojeg je igrač povezan na server.
- [NetStats_MessagesReceived](NetStats_MessagesReceived): Dohvatite broj mrežnih poruka koje je server primio od igrača.
- [NetStats_MessagesSent](NetStats_MessagesSent): Dohvatite broj mrežnih poruka koje je server poslao igraču.
- [NetStats_BytesSent](NetStats_BytesSent): Dohvatite količinu informacija (u bajtovima) koje je poslužitelj poslao uređaju za reprodukciju.
- [NetStats_MessagesRecvPerSecond](NetStats_MessagesRecvPerSecond): Dohvatite broj mrežnih poruka koje je poslužitelj primio od igrača u posljednjoj sekundi.
- [NetStats_PacketLossPercent](NetStats_PacketLossPercent): Dobijte packet loss procenat igrača.
- [NetStats_ConnectionStatus](NetStats_ConnectionStatus): Dohvatite status veze igrača.
- [NetStats_GetIpPort](NetStats_GetIpPort): Nabavite IP adresu i port igrača.
| openmultiplayer/web/docs/translations/bs/scripting/functions/NetStats_BytesReceived.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/NetStats_BytesReceived.md",
"repo_id": "openmultiplayer",
"token_count": 741
} | 358 |
---
title: PlayerTextDrawBoxColor
description: Postavlja boju box-a textdraw-a (PlayerTextDrawUseBox).
tags: ["player", "textdraw", "playertextdraw"]
---
## Deskripcija
Postavlja boju box-a textdraw-a (PlayerTextDrawUseBox).
| Ime | Deskripcija |
|-----------------|-----------------------------------------------------------|
| playerid | ID igrača čijem se player-textdrawu postavlja boja box-a. |
| PlayerText:text | ID player-textdrawa za postaviti boju box-a. |
| color | Boja za postaviti. Alpha (transparentno) je podržano. |
## Returns
Ova funkcija ne returna (vraća) nikakve posebne vrijednosti.
## Primjeri
```c
new PlayerText:pTextdraw[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
pTextdraw[playerid] = CreatePlayerTextDraw(playerid, x, y, "...");
PlayerTextDrawUseBox(playerid, pTextdraw[playerid], true);
PlayerTextDrawBoxColor(playerid, pTextdraw[playerid], 0xFF0000FF); // Crveni box bez transparentnosti
return 1;
}
```
## Srodne Funkcije
- [CreatePlayerTextDraw](CreatePlayerTextDraw): Kreiraj player-textdraw.
- [PlayerTextDrawDestroy](PlayerTextDrawDestroy): Uništi player-textdraw.
- [PlayerTextDrawColor](PlayerTextDrawColor): Postavi boju teksta u player-textdrawu.
- [PlayerTextDrawBackgroundColor](PlayerTextDrawBackgroundColor): Postavi boju pozadine player-textdrawa.
- [PlayerTextDrawAlignment](PlayerTextDrawAlignment): Postavi poravnanje player-textdrawa.
- [PlayerTextDrawFont](PlayerTextDrawFont): Postavi font player-textdrawa.
- [PlayerTextDrawLetterSize](PlayerTextDrawLetterSize): Postavi veličinu slova u tekstu player-textdrawa.
- [PlayerTextDrawTextSize](PlayerTextDrawTextSize): Postavi veličinu box-a player-textdrawa (ili dijela koji reaguje na klik za PlayerTextDrawSetSelectable).
- [PlayerTextDrawSetOutline](PlayerTextDrawSetOutline): Omogući/onemogući korišćenje outline-a za player-textdraw.
- [PlayerTextDrawSetShadow](PlayerTextDrawSetShadow): Postavi sjenu na player-textdraw.
- [PlayerTextDrawSetProportional](PlayerTextDrawSetProportional): Razmjeri razmak teksta u player-textdrawu na proporcionalni omjer.
- [PlayerTextDrawUseBox](PlayerTextDrawUseBox): Omogući/onemogući korišćenje box-a za player-textdraw.
- [PlayerTextDrawSetString](PlayerTextDrawSetString): Postavi tekst player-textdrawa.
- [PlayerTextDrawShow](PlayerTextDrawShow): Prikaži player-textdraw.
- [PlayerTextDrawHide](PlayerTextDrawHide): Sakrij player-textdraw.
| openmultiplayer/web/docs/translations/bs/scripting/functions/PlayerTextDrawBoxColor.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/PlayerTextDrawBoxColor.md",
"repo_id": "openmultiplayer",
"token_count": 914
} | 359 |
---
title: PlayerTextDrawUseBox
description: Omogući/onemogući korišćenje box-a za player-textdraw.
tags: ["player", "textdraw", "playertextdraw"]
---
## Deskripcija
Omogući/onemogući korišćenje box-a za player-textdraw.
| Ime | Deskripcija |
|-----------------|-----------------------------------------------------------|
| playerid | ID igrača za čiji se textdraw treba koristiti box ili ne. |
| PlayerText:text | ID player-textdrawa za omogućiti/onemogućiti box |
| bool:use | **true** da koristi box **false** da ne koristi box. |
## Returns
Ova funkcija ne returna (vraća) nikakve posebne vrijednosti.
## Primjeri
```c
new PlayerText:MyTD[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
MyTD[playerid] = CreatePlayerTextDraw(playerid, 40.0, 140.0, "_~N~Primjer Teksta!~N~_");
PlayerTextDrawUseBox(playerid, MyTD[playerid], true);
PlayerTextDrawBoxColor(playerid, MyTD[playerid], 0x00000066); // Postavite boju box-a na poluprozirnu crnu boju
return 1;
}
```
## Srodne Funkcije
- [CreatePlayerTextDraw](CreatePlayerTextDraw): Kreiraj player-textdraw.
- [PlayerTextDrawDestroy](PlayerTextDrawDestroy): Uništi player-textdraw.
- [PlayerTextDrawColor](PlayerTextDrawColor): Postavi boju teksta u player-textdrawu.
- [PlayerTextDrawBoxColor](PlayerTextDrawBoxColor): Postavi boju box-a od player-textdrawa.
- [PlayerTextDrawBackgroundColor](PlayerTextDrawBackgroundColor): Postavi boju pozadine player-textdrawa.
- [PlayerTextDrawAlignment](PlayerTextDrawAlignment): Postavi poravnanje player-textdrawa.
- [PlayerTextDrawFont](PlayerTextDrawFont): Postavi font player-textdrawa.
- [PlayerTextDrawLetterSize](PlayerTextDrawLetterSize): Postavi veličinu slova u tekstu player-textdrawa.
- [PlayerTextDrawTextSize](PlayerTextDrawTextSize): Postavi veličinu box-a player-textdrawa (ili dijela koji reaguje na klik za PlayerTextDrawSetSelectable).
- [PlayerTextDrawSetOutline](PlayerTextDrawSetOutline): Omogući/onemogući korišćenje outline-a za player-textdraw.
- [PlayerTextDrawSetShadow](PlayerTextDrawSetShadow): Postavi sjenu na player-textdraw.
- [PlayerTextDrawSetProportional](PlayerTextDrawSetProportional): Razmjeri razmak teksta u player-textdrawu na proporcionalni omjer.
- [PlayerTextDrawSetString](PlayerTextDrawSetString): Postavi tekst player-textdrawa.
- [PlayerTextDrawShow](PlayerTextDrawShow): Prikaži player-textdraw.
- [PlayerTextDrawHide](PlayerTextDrawHide): Sakrij player-textdraw.
| openmultiplayer/web/docs/translations/bs/scripting/functions/PlayerTextDrawUseBox.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/PlayerTextDrawUseBox.md",
"repo_id": "openmultiplayer",
"token_count": 934
} | 360 |
---
title: SendDeathMessage
description: Dodaje smrt 'killfeedu' s desne strane ekrana za sve igrače.
tags: []
---
## Deskripcija
Dodaje smrt 'killfeedu' s desne strane ekrana za sve igrače.
| Ime | Deskripcija |
| -------- | --------------------------------------------------------------------------------------------------------------------- |
| killer | ID ubice (može biti INVALID_PLAYER_ID). |
| playerid | ID igrača koji je umro. |
| weapon | Razlog (ne uvijek oružje) smrti žrtve. Specijalne se ikonice također mogu koristiti (ICON_CONNECT i ICON_DISCONNECT). |
## Returns
Ova funkcija uvijek returna (vraća) 1, bilo da se funkcija neuspješno izvrši. Funkcija će neuspješno da se izvrši (neće se prikazati poruka o smrti) ako je 'playerid' nevažeći. Ako je 'reason' nevažeći, prikazana je generička ikona lobanje i kostiju. 'killerid' nevažeći (INVALID_PLAYER_ID) je važeći.
## Primjeri
```c
public OnPlayerDeath(playerid, killerid, WEAPON:reason)
{
SendDeathMessage(killerid, playerid, reason);
return 1;
}
```
## Zabilješke
:::tip
Poruke smrti mogu se obrisati upotrebom važećeg ID-a igrača za 'playerid' koji nije povezan. Da biste prikazali smrtnu poruku samo za jednog igrača, koristite SendDeathMessageToPlayer. NPC-ove možete koristiti za stvaranje vlastitih razloga smrti.
:::
## Srodne Funkcije
- [SendDeathMessageToPlayer](SendDeathMessageToPlayer): Dodaj ubistvo na listu smrti za igrača.
- [OnPlayerDeath](../callbacks/OnPlayerDeath): Pozvano kada igrač umre.
| openmultiplayer/web/docs/translations/bs/scripting/functions/SendDeathMessage.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/SendDeathMessage.md",
"repo_id": "openmultiplayer",
"token_count": 903
} | 361 |
---
title: SetObjectMaterial
description: Zamijeni teksturu objekta sa teksturom drugog modela iz igre.
tags: []
---
## Deskripcija
Zamijeni teksturu objekta sa teksturom drugog modela iz igre.
| Ime | Deskripcija |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| objectid | ID objekta za zamijeniti teksturu. |
| materialindex | Index materijala na objektu za zamijeniti (od 0 do 15) |
| modelid | ID modela na kome se nalazi zamjenska tekstura. Koristite 0 za alfa. Koristite -1 za promjenu boje materijala bez mijenjanja postojeće teksture. |
| txdname | Ime txd fatoteke koja sadrži zamjensku teksturu (koristi "none" ako nije potrebno) |
| texturename | Ime teksture za koristiti kao zamjensku (koristi "none" ako nije potrebno) |
| materialcolor | Boja objekta za postaviti, kao cijeli broj ili hex u ARGB formatu. Korištenjem 0 čuva trenutnu boju materijala. |
## Returns
1: Funkcija uspješno izvršena.
0: Funkcija neuspješno izvršena.
## Primjeri
```c
public OnPlayerCommandText(playerid,cmdtext[])
{
if (!strcmp(cmdtext,"/mycommand",true))
{
new
Float: X, Float: Y, Float: Z,
myObject;
GetPlayerPos(playerid, X, Y, Z);
myObject = CreateObject(19371, X, Y, Z+0.5, 0.0, 0.0, 0.0, 300.0);
SetObjectMaterial(myObject, 0, 19341, "egg_texts", "easter_egg01", 0xFFFFFFFF);
// Zamjenjuje teksturu našeg objekta sa teksturom objekta 19341
return 1;
}
return 0;
}
```
## Zabilješke
:::tip
Vertex (vrhovno) osvjetljenje objekta će nestati ako se promijeni boja materijala.
:::
:::warning
MORAŠ koristiti ARGB format boje, ne RGBA kao što se koristi u klijent porukama i sl.
:::
## Srodne Funkcije
- [SetPlayerObjectMaterial](SetPlayerObjectMaterial): Zamijeni teksturu player objekta sa teksturom drugog modela iz igre.
- [SetObjectMaterialText](SetObjectMaterialText): Zamijeni teksturu objekta sa tekstom.
## Filterskripte koje podržavaju teksturisanje/text
- Ultimate Creator od Nexius
- Fusez's Map Editor od RedFusion
| openmultiplayer/web/docs/translations/bs/scripting/functions/SetObjectMaterial.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/SetObjectMaterial.md",
"repo_id": "openmultiplayer",
"token_count": 1412
} | 362 |
---
title: SetPlayerChatBubble
description: Kreira chat balončić iznad igračevog nametag-a.
tags: ["player"]
---
## Deskripcija
Kreira chat balončić iznad igračevog nametag-a.
| Ime | Deskripcija |
| ------------ | ---------------------------------------------------------- |
| playerid | Igrač koji će imati chat balončić. |
| text[] | Tekst za prikazati. |
| color | Boja teksta. |
| drawdistance | Distanca sa koje će igrači moći vidjeti chat balončić. |
| expiretime | Vrijeme u milisekundama za koje će balončić biti prikazan. |
## Returns
Ova funkcija ne returna (vraća) nikakve posebne vrijednosti.
## Primjeri
```c
public OnPlayerText(playerid, text[])
{
SetPlayerChatBubble(playerid, text, 0xFF0000FF, 100.0, 10000);
return 1;
}
```
## Zabilješke
:::tip
Ne možete vidjeti svoje lične chat balončiće. Isto se dešava i sa prikavčenim 3D text labelom.
:::
:::tip
Ugradnju boja možete koristiti za više boja u poruci. Korištenje '-1' kao boje učinit će tekst bijelim (iz jednostavnog razloga što je -1, kada je predstavljen u heksadecimalnom zapisu, 0xFFFFFFFF).
:::
## Srodne Funkcije
| openmultiplayer/web/docs/translations/bs/scripting/functions/SetPlayerChatBubble.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/SetPlayerChatBubble.md",
"repo_id": "openmultiplayer",
"token_count": 684
} | 363 |
---
title: SetPlayerObjectPos
description: Postavlja poziciju player-objekta u navedenim kordinatama.
tags: ["player"]
---
## Deskripcija
Postavlja poziciju player-objekta u navedenim kordinatama.
| Ime | Deskripcija |
| -------- | --------------------------------------------------------------------------------- |
| playerid | ID čijem će se player-objektu promijeniti pozicija. |
| objectid | ID player-objekta za postaviti poziciju. Returnovan/vraćen od CreatePlayerObject. |
| Float:X | X kordinata za staviti objekat. |
| Float:Y | Y kordinata za staviti objekat. |
| Float:Z | Z kordinata za staviti objekat. |
## Returns
1: Funkcija uspješno izvršena.
0: Funkcija neuspješno izvršena. Igrač i/ili objekat ne postoje.
## Primjeri
```c
new obj = CreatePlayerObject(...);
// Kasnije
SetPlayerObjectPos(playerid, obj, 2001.195679, 1547.113892, 14.283400);
```
## Srodne Funkcije
- [CreatePlayerObject](CreatePlayerObject): Kreiraj objekat za samo jednog igrača.
- [DestroyPlayerObject](DestroyPlayerObject): Uništi player objekat.
- [IsValidPlayerObject](IsValidPlayerObject): Provjeri da li je određeni player objekat validan.
- [MovePlayerObject](MovePlayerObject): Pomjeri player objekat.
- [StopPlayerObject](StopPlayerObject): Zaustavi player objekat od kretanja.
- [SetPlayerObjectRot](SetPlayerObjectRot): Postavi rotaciju player objekta.
- [GetPlayerObjectPos](GetPlayerObjectPos): Lociraj player objekat.
- [GetPlayerObjectRot](GetPlayerObjectRot): Provjeri rotaciju player objekta.
- [AttachPlayerObjectToPlayer](AttachPlayerObjectToPlayer): Prikvači player objekat za igrača.
- [CreateObject](CreateObject): Kreiraj objekat.
- [DestroyObject](DestroyObject): Uništi objekat.
- [IsValidObject](IsValidObject): Provjeri da li je određeni objekat validan.
- [MoveObject](MoveObject): Pomjeri objekat.
- [StopObject](StopObject): Zaustavi objekat od kretanja.
- [SetObjectPos](SetObjectPos): Postavi poziciju objekta.
- [SetObjectRot](SetObjectRot): Postavi rotaciju objekta.
- [GetObjectPos](GetObjectPos): Lociraj objekat.
- [GetObjectRot](GetObjectRot): Provjeri rotaciju objekta.
- [AttachObjectToPlayer](AttachObjectToPlayer): Prikvači objekat za igrača.
| openmultiplayer/web/docs/translations/bs/scripting/functions/SetPlayerObjectPos.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/SetPlayerObjectPos.md",
"repo_id": "openmultiplayer",
"token_count": 1038
} | 364 |
---
title: SetPlayerWorldBounds
description: Postavite granice svijeta igraču.
tags: ["player"]
---
## Deskripcija
Postavite granice svijeta igraču. Igrači ne mogu ići izvan granica (biće gurnuti nazad).
| Ime | Deskripcija |
| ----------- | ------------------------------------------- |
| playerid | ID igrača za postaviti granice svijeta. |
| Float:x_max | Maksimalna X kordinata gdje igrač može ići. |
| Float:x_min | Maksimalna X kordinata gdje igrač može ići. |
| Float:y_max | Minimalna Y kordinata gdje igrač može ići. |
| Float:y_min | Minimalna Y kordinata gdje igrač može ići. |
## Returns
Ova funkcija ne returna (vraća) nikakve posebne vrijednosti.
## Primjeri
```c
public OnPlayerSpawn(playerid)
{
SetPlayerWorldBounds(playerid, 20.0, 0.0, 20.0, 0.0);
return 1;
}
```
```
(Sjever)
ymax
|----------|
| |
(Zapad) xmin | | xmax (Istok)
| |
|----------|
ymin
(Jug)
```
## Zabilješke
:::tip
Svjetske granice igrača mogu se resetirati postavljanjem na 20000.0000, -20000.0000, 20000.0000, -20000.0000. To su zadane vrijednosti.
:::
:::warning
Ova funkcija ne radi u enterijerima!
:::
## Srodne Funkcije
- [GangZoneCreate](GangZoneCreate): Kreiraj gangzonu.
| openmultiplayer/web/docs/translations/bs/scripting/functions/SetPlayerWorldBounds.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/SetPlayerWorldBounds.md",
"repo_id": "openmultiplayer",
"token_count": 720
} | 365 |
---
title: SetVehicleToRespawn
description: Postavlja vozila nazad na poziciju gdje je kreirano.
tags: ["vehicle"]
---
## Deskripcija
Postavlja vozila nazad na poziciju gdje je kreirano.
| Ime | Deskripcija |
| --------- | -------------------- |
| vehicleid | ID vozila za respawn |
## Returns
1: Funkcija uspješno izvršena.
0: Funkcija neuspješno izvršena. Vozilo ne postoji.
## Primjeri
```c
// Respawnuje prvo vozilo.
SetVehicleToRespawn(1);
for(new i = GetVehiclePoolSize(); i > 0; i--)
{
SetVehicleToRespawn(i);
}
```
## Srodne Funkcije
- [CreateVehicle](CreateVehicle): Kreiraj vozilo.
- [DestroyVehicle](DestroyVehicle): Uništi vozilo.
| openmultiplayer/web/docs/translations/bs/scripting/functions/SetVehicleToRespawn.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/SetVehicleToRespawn.md",
"repo_id": "openmultiplayer",
"token_count": 292
} | 366 |
---
title: StopPlayerHoldingObject
description: Uklanja prikvačene objekte.
tags: ["player"]
---
## Deskripcija
Uklanja prikvačene objekte.
| Ime | Deskripcija |
| -------- | --------------------------------------------------- |
| playerid | ID igrača kojem želite ukloniti prikvačeni objekat. |
## Returns
1 pri uspjehu, 0 pri grešci
## Primjeri
```c
public OnPlayerDeath(playerid, killerid, WEAPON:reason)
{
if (IsPlayerHoldingObject(playerid))
{
StopPlayerHoldingObject(playerid);
}
return 1;
}
```
## Zabilješke
:::warning
Je uklonjena u SA-MP 0.3c. provjerite [RemovePlayerAttachedObject](RemovePlayerAttachedObject)
:::
## Srodne Funkcije
- [SetPlayerHoldingObject](SetPlayerHoldingObject): Pričvršćuje objekat za kost.
| openmultiplayer/web/docs/translations/bs/scripting/functions/StopPlayerHoldingObject.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/StopPlayerHoldingObject.md",
"repo_id": "openmultiplayer",
"token_count": 342
} | 367 |
---
title: TextDrawSetPreviewVehCol
description: Ako je model vozila korišten u 3D textdraw pregledu (3D preview textdraw), ovo postavlja dvije vrijednosti boja za to vozilo.
tags: ["textdraw"]
---
## Deskripcija
Ako je model vozila korišten u 3D textdraw pregledu (3D preview textdraw), ovo postavlja dvije vrijednosti boja za to vozilo.
| Ime | Deskripcija |
| ------ | -------------------------------------------------------------------------- |
| text | ID textdrawa koji je postavljen za prikazivanje pregleda 3D modela vozila. |
| color1 | ID Primarne boje za postaviti vozilu. |
| color2 | ID Sekundarne boje za postaviti vozilu. |
## Returns
Ova funkcija ne returna (vraća) nikakve posebne vrijednosti.
## Primjeri
```c
new Text: gMyTextdraw;
public OnGameModeInit()
{
gMyTextdraw = TextDrawCreate(320.0, 240.0, "_");
TextDrawFont(gMyTextdraw, TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawUseBox(gMyTextdraw, 1);
TextDrawBoxColor(gMyTextdraw, 0x000000FF);
TextDrawTextSize(gMyTextdraw, 40.0, 40.0);
TextDrawSetPreviewModel(gMyTextdraw, 411); // Prikaži model 411 (Infernus)
TextDrawSetPreviewVehCol(gMyTextdraw, 6, 6); // Postavi infernusu boju 6 (Žuta)
// Još uvijek moraš da koristiš TextDrawShowForAll/TextDrawShowForPlayer kako bi textdraw bio vidljiv.
return 1;
}
```
## Zabilješke
:::warning
Textdraw MORA korisiti tip fonta TEXT_DRAW_FONT_MODEL_PREVIEW kako bi ova funkcija imala efekta.
:::
## Srodne Funkcije
- [TextDrawSetPreviewModel](TextDrawSetPreviewModel): Postavi 3D pregled modela textdrawa.
- [TextDrawSetPreviewRot](TextDrawSetPreviewRot): Postavlja rotaciju 3D prikaza u textdraw-u.
- [TextDrawFont](TextDrawFont): Postavi font textdrawa.
- [OnPlayerClickTextDraw](../callbacks/OnPlayerClickTextDraw): Pozvano kada igrač klikne na textdraw.
| openmultiplayer/web/docs/translations/bs/scripting/functions/TextDrawSetPreviewVehCol.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/TextDrawSetPreviewVehCol.md",
"repo_id": "openmultiplayer",
"token_count": 850
} | 368 |
---
title: UpdateVehicleDamageStatus
description: Postavlja različite statuse vizuelnog oštećenja vozila, kao što su ispucale gume, slomljena svjetla i oštećeni paneli.
tags: ["vehicle"]
---
:::tip
Za neke korisne funkcije za rad s vrijednostima oštećenja vozila pogledajte [ovdje](../resources/damagestatus).
:::
## Deskripcija
Postavlja različite statuse vizuelnog oštećenja vozila, kao što su ispucale gume, slomljena svjetla i oštećeni paneli.
| Ime | Deskripcija |
| --------- | ------------------------------------------------- |
| vehicleid | ID vozila za utvrđivanje štete. |
| panels | Skup bitova koji sadrže status oštećenja panela. |
| doors | Skup bitova koji sadrže status oštećenja vrata. |
| lights | Skup bitova koji sadrže status oštećenja svjetla. |
| tires | Skup bitova koji sadrže status oštećenja guma. |
## Returns
Ova funkcija ne returna (vraća) nikakve posebne vrijednosti.
## Primjeri
```c
new
VEHICLE_PANEL_STATUS:panels,
VEHICLE_DOOR_STATUS:doors,
VEHICLE_LIGHT_STATUS:lights,
VEHICLE_TIRE_STATUS:tires;
GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
tires = VEHICLE_TIRE_STATUS:15; // Stavljajući gume na 15 biće probušene
// Or do it like this:
tires = (VEHICLE_TIRE_STATUS_FRONT_LEFT_POPPED | VEHICLE_TIRE_STATUS_FRONT_RIGHT_POPPED | VEHICLE_TIRE_STATUS_REAR_LEFT_POPPED | VEHICLE_TIRE_STATUS_REAR_RIGHT_POPPED);
UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
```
## Srodne Funkcije
- [SetVehicleHealth](SetVehicleHealth): Postavi helte vozila.
- [GetVehicleHealth](GetVehicleHealth): Provjeri helte vozila.
- [RepairVehicle](RepairVehicle): U potpunosti popravite vozilo.
- [GetVehicleDamageStatus](GetVehicleDamageStatus): Dobij status oštečenja za svaki dio posebno.
## Srodne Callbacks
- [OnVehicleDamageStatusUpdate](../callbacks/OnVehicleDamageStatusUpdate): Pozvano kada se stanje oštećenja vozila promijeni.
## Srodne Resources
- [Damage Status](../resources/damagestatus)
- [Vehicle Panel Status](../resources/vehicle-panel-status)
- [Vehicle Door Status](../resources/vehicle-door-status)
- [Vehicle Light Status](../resources/vehicle-light-status)
- [Vehicle Tire Status](../resources/vehicle-tire-status)
| openmultiplayer/web/docs/translations/bs/scripting/functions/UpdateVehicleDamageStatus.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/UpdateVehicleDamageStatus.md",
"repo_id": "openmultiplayer",
"token_count": 976
} | 369 |
---
title: fgetchar
description: Čita jedan znak iz datoteke.
tags: []
---
:::warning
Ova funkcija započinje malim slovom.
:::
## Deskripcija
Čita jedan znak iz datoteke.
| Ime | Deskripcija |
| ------ | ---------------------------------------------------------------- |
| handle | Upravitelj datoteke za upotrebu, otvorila je fopen () |
| value | Ovaj parametar nema koristi, samo ga ostavite na "0". |
| utf8 | Ako je tačno, čitajte znak kao UTF-8, inače kao prošireni ASCII. |
## Returns
Ako uspije, vraća proširenu ASCII ili UTF-8 vrijednost znaka na trenutnoj poziciji u datoteci, inače EOF (kraj datoteke).
## Primjeri
```c
// Otvori "file.txt" u "read only" modu (samo čitanje)
new File:handle = fopen("file.txt", io_read),
// Deklariši "g_char"
g_char;
// Provjeri ako je "file.txt" otvoren
if (handle)
{
// Pročitajte sve znakove, zanemarujući UTF-8.
while((g_char = fgetchar(handle, 0, false)) != EOF)
{
// Ispiši karakter
printf("[ \"file.txt\" ] 0x%x", g_char);
}
// Zatvori "file.txt"
fclose(handle);
}
else
{
// Error
print("Nesupješno otvaranje \"file.txt\".");
}
```
## Zabilješke
:::warning
Korištenje nevaljanog upravitelja srušit će vaš server! Nabavite važeći upravitelj pomoću fopen ili ftemp.
:::
## Srodne Funkcije
- [fopen](fopen): Otvori fajl/datoteku.
- [fclose](fclose): Zatvori fajl/datoteku.
- [ftemp](ftemp): Stvorite privremeni tok fajlova/datoteka.
- [fremove](fremove): Uklonite fajl/datoteku.
- [fwrite](fwrite): Piši u fajl/datoteku.
- [fread](fread): Čitaj fajl/datoteku.
- [fputchar](fputchar): Stavite znak u fajl/datoteku.
- [fgetchar](fgetchar): Dobijte znak iz fajla/datoteke.
- [fblockwrite](fblockwrite): Zapišite blokove podataka u fajl/datoteku.
- [fblockread](fblockread): Očitavanje blokova podataka iz fajla/datoteke.
- [fseek](fseek): Skoči na određeni znak u fajlu/datoteci.
- [flength](flength): Nabavite dužinu fajla/datoteke.
- [fexist](fexist): Provjeri da li datoteka postoji.
- [fmatch](fmatch): Provjeri podudaraju li se uzorci s nazivom datoteke.
| openmultiplayer/web/docs/translations/bs/scripting/functions/fgetchar.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/fgetchar.md",
"repo_id": "openmultiplayer",
"token_count": 1048
} | 370 |
---
title: floatsub
description: Oduzima jedan float od drugog.
tags: []
---
:::warning
Ova funkcija započinje malim slovom.
:::
## Deskripcija
Oduzima jedan float od drugog. Imajte na umu da ova funkcija nema stvarnu upotrebu, jer se umesto nje može jednostavno koristiti standardni operator (-).
| Ime | Deskripcija |
| ----- | ----------------------------------------- |
| oper1 | Prvi Float. |
| oper2 | Drugi Float (oduzima se od prvog floata.) |
## Returns
Razlika između dva data floata.
## Primjeri
```c
public OnGameModeInit()
{
new Float:Number1 = 5, Float:Number2 = 2; //Deklarira dva floats, Number1 (5) i Number2 (2)
new Float:Difference;
Difference = floatsub(Number1, Number2);//Sprema razliku (5-2 = 3) broja1 i broja2 u float "Razlika"
return 1;
}
```
## Srodne Funkcije
- [Floatadd](Floatadd): Dodaje dva plovka.
- [Floatmul](Floatmul): Množi dva floata.
- [Floatdiv](../funtions/Floatdiv): Dijeli float sa drugim.
| openmultiplayer/web/docs/translations/bs/scripting/functions/floatsub.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/floatsub.md",
"repo_id": "openmultiplayer",
"token_count": 455
} | 371 |
---
title: gpci
description: Dohvatite CI (računarska/klijentska identifikacija) korisnika, ovo je povezano s njihovim SAMP/GTA-om na njegovom računaru.
tags: []
---
:::warning
Ova funkcija započinje malim slovom.
:::
## Deskripcija
Dohvatite CI (računarska/klijentska identifikacija) korisnika, ovo je povezano s njihovim SAMP/GTA-om na njegovom računaru.
:::warning
CI igrač NIJE JEDINSTVEN, neki igrači mogu imati sličan ili isti CI, nemojte banovati samo zbog toga pto im je isti CI.
:::
## Parameters
| Ime | Deskripcija |
| -------- | ------------------------------------------------------ |
| playerid | ID igrača za dohvatiti njegov CI. |
| string[] | String za pohraniti dohvaćeni CI. |
| length | Dodijeljena veličina stringa, treba koristiti sizeof() |
## Return Values
Ova funkcija će vratiti vrijednost stringa korisničkog CI.
:::warning
Morate dodati 'native gpci(playerid, serial [], len);' na vrhu vaše skripte prije upotrebe bilo kojih CI funkcija.
:::
## Primjer upotrebe
```c
#if !defined gpci
native gpci(playerid, serial[], len);
#endif
new szSerial[41]; // 40 + \0
gpci(iPlayerID, szSerial, sizeof(szSerial));
return szSerial;
```
:::tip
Ova funkcija može vam dobro doći da biste lako dobili nečiji CI.
:::
```c
ReturnCI(iPlayerID)
{
new
szSerial[41]; // 40 + \0
gpci(iPlayerID, szSerial, sizeof(szSerial));
return szSerial;
}
```
## Srodne Funkcije
- [GetNetworkStats]GetNetworkStats): Dobiva mrežne statistike servera i sprema ih u string.
- [GetPlayerNetworkStats](GetPlayerNetworkStats): Dobija mrežne statistike igrača i pohranjuje ih u string.
| openmultiplayer/web/docs/translations/bs/scripting/functions/gpci.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/gpci.md",
"repo_id": "openmultiplayer",
"token_count": 781
} | 372 |
---
title: strcat
description: Ova funkcija spaja dva stringa u odredišni string.
tags: []
---
:::warning
Ova funkcija započinje malim slovom.
:::
## Deskripcija
Ova funkcija spaja dva stringa u odredišni string.
| Ime | Deskripcija |
| --------------------- | ---------------------------------------- |
| dest[] | String za pohraniti dva spojena stringa. |
| const source[] | Izvorni string. |
| maxlength=sizeof dest | Maksimalna dužina odredišta. |
## Returns
Dužina novog odredišnog stringa.
## Primjeri
```c
new string[40] = "Hello";
strcat(string, " World!");
// string je sada 'Hello World!'
```
## Srodne Funkcije
- [strcmp](strcmp): Uporedi dva stringa kako bi provjerio da li su isti.
- [strfind](strfind): Pretraži string u drugom stringu.
- [strdel](strdel): Obriši dio stringa.
- [strins](strins): Unesi tekst u string.
- [strlen](strlen): Dobij dužinu stringa.
- [strmid](strmid): Izdvoji dio stringa u drugi string.
- [strpack](strpack): Upakuj string u odredišni string.
- [strval](strval): Pretvori string u cijeli broj.
| openmultiplayer/web/docs/translations/bs/scripting/functions/strcat.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/strcat.md",
"repo_id": "openmultiplayer",
"token_count": 515
} | 373 |
---
title: Slotovi komponenti
---
:::info
Sljedeći tipovi automobilskih modova mogu se koristiti za rad sa [GetVehicleComponentInSlot](../functions/GetVehicleComponentInSlot) funkcijom.
:::
| Slot | Definicija |
| ---- | ----------------------- |
| 0 | CARMODTYPE_SPOILER |
| 1 | CARMODTYPE_HOOD |
| 2 | CARMODTYPE_ROOF |
| 3 | CARMODTYPE_SIDESKIRT |
| 4 | CARMODTYPE_LAMPS |
| 5 | CARMODTYPE_NITRO |
| 6 | CARMODTYPE_EXHAUST |
| 7 | CARMODTYPE_WHEELS |
| 8 | CARMODTYPE_STEREO |
| 9 | CARMODTYPE_HYDRAULICS |
| 10 | CARMODTYPE_FRONT_BUMPER |
| 11 | CARMODTYPE_REAR_BUMPER |
| 12 | CARMODTYPE_VENT_RIGHT |
| 13 | CARMODTYPE_VENT_LEFT |
| openmultiplayer/web/docs/translations/bs/scripting/resources/Componentslots.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/bs/scripting/resources/Componentslots.md",
"repo_id": "openmultiplayer",
"token_count": 382
} | 374 |
---
title: OnActorStreamIn
description: Dieses Callback wird ausgeführt wenn ein Actor von einem Spieler gestreamt wird.
tags: []
---
<VersionWarn name='callback' version='SA-MP 0.3.7' />
## Description
Dieses Callback wird ausgeführt wenn ein Actor von einem Spieler gestreamt wird.
| Name | Beschreibung |
| ----------- | ------------------------------------------------------------- |
| actorid | Die ID des Actors der vom Spieler gestreamt wird. |
| forplayerid | Die ID des Spielers der den Actor gestreamt hat. |
## Rückgabe(return value)
Wird in Filterscripts immer zuerst aufgerufen.
## Beispiele
```c
public OnActorStreamIn(actorid, forplayerid)
{
new string[40];
format(string, sizeof(string), "Actor %d wird jetzt für dich gestreamt.", actorid);
SendClientMessage(forplayerid, 0xFFFFFFFF, string);
return 1;
}
```
## Anmerkungen
<TipNPCCallbacks />
| openmultiplayer/web/docs/translations/de/scripting/callbacks/OnActorStreamIn.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/de/scripting/callbacks/OnActorStreamIn.md",
"repo_id": "openmultiplayer",
"token_count": 389
} | 375 |
---
title: Common Issues
---
## Contents
## Client
### Tengo constantemente el error "San Andreas cannot be found"
¡San Andreas Multiplayer **NO ES** un programa independiente! Solo añade funciones multijugador al GTA: San Andreas (y, por lo tanto, necesitas GTA:SA instalado en tu computadora). Tiene que ser, además, la versión **EU/US v1.0**, ya que otras versiones como 2.0, versiones de Steam o versiones de Direct2Drive no funcionarán. [Cliquea aquí para descargar un parche para downgradear tu GTA:SA a la version 1.0](http://grandtheftauto.filefront.com/file/GTA_SA_Downgrader_Patch;74661)
### No veo ningún servidor en el buscador de servidores de SA:MP.
Primero que nada, asegúrate de seguir los procedimientos previstos en la [Guía de inicio rápido](https://team.sa-mp.com/wiki/Getting_Started). Si el problema persiste aún si verificaste lo anterior, debes permitir el acceso de SA:MP a través de tu cortafuegos. Desafortunadamente, debido a la gran cantidad de software cortafuego que existe, no podemos dar soporte con esto, pero sugerimos el revisar en el sitio del programa (o realizar una busqueda ante nuestro todo poderoso Google). Asegúrate además de tener la última versión de SA:MP.
### El modo un jugador inicia en vez de SA:MP
:::warning
No se supone que debas ver las opciones del modo un jugador (Iniciar Partida, Cargar Partida, etcétera) - SA:MP debería iniciarse por si solo y no presentar estas opciones. Si ves la opción de "Inciar Partida", se inició el modo de un jugador en ves de SA:MP.
:::
El modo un jugador puede iniciarse por 2 razones: Tienes SA:MP instalado en la carpeta incorrecta o no tienes una versión compatible de GTA:SA. Si tienes la versión incorrecta puedes reallizar un downgrade a tu juego utilizando el downgrader de GTA:SA. Cliquea [aquí](http://grandtheftauto.filefront.com/file/GTA_SA_Downgrader_Patch;74661) para descargarlo.
Existen ciertos casos en el que el menú del modo un jugador será mostrado, pero SA:MP habrá correctamente inciado. Para arreglar esto simplemente tienes que seleccionar un elemento en el menú, seguido de tocarla tecla Escape para salir de este. De esta forma, SA:MP procederá a cargar.
### Obtengo el error "Unacceptable Nickname" cuando conecto a un servidor.
Asegúrate de que no estas usando ningun carácter no permitido (solo puedes utilizar números del 0-9, letras de la A a la Z, \[\], (), \$, @, ., \_ y =), además de asegurarte que tu nombre no supera los 20 carácteres. Esto también podría ser causado cuando un jugador está conectado en el servidor con el mismo nombre que tú (que puede pasar si reconectas a un servidor de manera rápida antes de que el servidor registre tu desconexión). Un servidor de SA:MP corriendo en Windows durante mas de 50 días seguidos puede también ocasionar este bug.
### La pantalla se queda en "Connecting to IP:Port..."
Esto puede ser causado porque el servidor no esta encendido. Si tienes este error con mas de 1 servidor y estas seguro que estos servidores no están apagados, deshabilita tu cortafuegos y comprueba si el error persiste. Caso contrario, reconfigura tu cortafuegos para aceptar el tráfico entrante-saliente de SA:MP. Puede ser también que estes ejecutando una versión obsoleta de SA:MP - Puedes encontrar la versión más reciente [Aquí](http://sa-mp.com/download.php).
### Tengo un GTA:SA modificado y SA:MP no inicia
Si SA:MP no inicia, intenta remover las modificaciones instaladas.
### Cuando ejecuto GTA con SA:MP no sucede nada (no inicia)
Borra gta_sa.set de tu carpeta "GTA San Andreas User Files", además de asegurarte de que no tienes ningun cheat o modificaciones.
### El juego crashea (se cierra) cuando un vehículo explota
Si tienes 2 monitores, hay 3 maneras de resolverlo:
1. Deshabilita tu segundo monitor cuando juegues SA:MP. (Quizás no sea lo mejor, pero es lo más rapido si no te importa el no poder utilizar el otro monitor).
2. Configura "Efectos Visuales" a Bajo (Escape > Opciones > Configuración de pantalla > Avanzados).
3. Renombra tu carpeta de GTA:SA (ejemplo "GTA San Andreas2") (Esto puede funcionar a veces, de todas maneras a veces puede dejar de funcionar nuevamente así que tienes que renombrarla de otra forma).
### Mi ratón no funciona luego de slair del menú de pausa
Si tu ratón no funciona en el juego y funciona de manera incompleta en el menú de pausa, deberías desactivar la función multinúcleo ("multicore") de tu[sa-mp.cfg](../../../client/ClientCommands#file-sa-mpcfg "Sa-mp.cfg") (Colocala en 0). Pulsar repetidamente la tecla Escape o mantenerla apretada hasta que el ratón responda de nuevo puede funcionar, pero no es una solución definitiva.
### El archivo dinput8.dll no existe
Este problema puede aparecer cuando DirectX no esta instalado correctamente. Intenta reinstalarlo (no olvides de reiniciar tu PC). Si el problema persiste, solo ve a C:\\Windows\\System32 y copia el archivo dinput.dll a tu carpeta de GTA.
### No puedo ver los nombres de los demás jugadores
Por favor comprender que algunos servidores tienen sus nametags desactivados de forma global. De todas formas, este problema puede ocurrir en computadores con procesadores que incluyen gráficos integrados Intel HD (Que no estarían exactamente hechos para gaming, aún así). Desafortunadamente, la causa exacta es desconocida y no parece haber ninguna forma de arreglarlo hasta ahora. Una solución sería el instalar un procesador gráfico dedicado (tarjeta de video) en tu computadora, siempre y cuando sea posible y tu presupuesto monetario te lo permita.
| openmultiplayer/web/docs/translations/es/client/CommonClientIssues.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/es/client/CommonClientIssues.md",
"repo_id": "openmultiplayer",
"token_count": 1998
} | 376 |
---
título: OnObjectMoved
descripción: Este callback se llama cuando un objeto es movido después de usar MoveObject (cuando este termina de moverse).
tags: []
---
## Descripción
Este callback se llama cuando un objeto es movido después de usar MoveObject (cuando este termina de moverse).
| Nombre | Descripción |
| -------- | ----------------------------------- |
| objectid | El ID del objeto que fue movido. |
## Devoluciones
Siempre se llama primero en filterscripts.
## Ejemplos
```c
public OnObjectMoved(objectid)
{
printf("El objeto %d finalizó su movimiento.", objectid);
return 1;
}
```
## Notas
:::tip
SetObjectPos no funciona cuando es usado en este callback. Para solucionarlo, vuelva a crear el objeto.
:::
## Funciones Relacionadas
- [MoveObject](../functions/MoveObject): Mover un objeto.
- [MovePlayerObject](../functions/MovePlayerObject): Mover un objeto de jugador.
- [IsObjectMoving](../functions/IsObjectMoving): Chequear si el objeto está moviéndose.
- [StopObject](../functions/StopObject): Para el movimiento de un objeto.
- [OnPlayerObjectMoved](OnPlayerObjectMoved): Se llama cuando un objeto de jugador deja de moverse.
| openmultiplayer/web/docs/translations/es/scripting/callbacks/OnObjectMoved.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/es/scripting/callbacks/OnObjectMoved.md",
"repo_id": "openmultiplayer",
"token_count": 436
} | 377 |
---
título: OnPlayerFinishedDownloading
descripción: Este callback se llama cuando un jugador finaliza de descargar modelos personalizados.
tags: ["player"]
---
<VersionWarnES name='callback' version='SA-MP 0.3.DL R1' />
## Descripción
Este callback se llama cuando un jugador finaliza de descargar modelos personalizados. Para más información sobre cómo añadir modelos personalizados a su servidor, vea el thread de lanzamiento y este tutorial.
| Nombre | Descripción |
| ------------ | ------------------------------------------------------------------------------ |
| playerid | El ID del jugador que finalizó de descargar modelos personalizados. |
| virtualworld | El ID del mundo virtual en el que el jugador terminó de descargar los modelos. |
## Devoluciones
Este callback no controla devoluciones.
## Ejemplos
```c
public OnPlayerFinishedDownloading(playerid, virtualworld)
{
SendClientMessage(playerid, 0xffffffff, "Descargas finalizadas.");
return 1;
}
```
## Notas
:::tip
Este callback se llama cada vez que un jugador cambia de mundo virtual, incluso si no hay modelos personalizados presentes en ese mundo.
:::
## Funciones Relacionadas
| openmultiplayer/web/docs/translations/es/scripting/callbacks/OnPlayerFinishedDownloading.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/es/scripting/callbacks/OnPlayerFinishedDownloading.md",
"repo_id": "openmultiplayer",
"token_count": 466
} | 378 |
---
título: OnPlayerStreamIn
descripción: Este callback se llama cuando un jugador es cargado (se hace visible) por el cliente de otros jugadores.
tags: ["player"]
---
## Descripción
Este callback se llama cuando un jugador es cargado (se hace visible) por el cliente de otros jugadores.
| Nombre | Descripción |
| ----------- | ------------------------------------------------------- |
| playerid | El ID del jugador que fue cargado. |
| forplayerid | El ID del jugador que cargó al otro jugador. |
## Devoluciones
Siempre se llama primero en filterscripts.
## Ejemplos
```c
public OnPlayerStreamIn(playerid, forplayerid)
{
new string[40];
format(string, sizeof(string), "El jugador %d se cargó en tu cliente.", playerid);
SendClientMessage(forplayerid, 0xFFFFFFFF, string);
return 1;
}
```
## Notas
<TipNPCCallbacksES />
## Funciones Relacionadas
| openmultiplayer/web/docs/translations/es/scripting/callbacks/OnPlayerStreamIn.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/es/scripting/callbacks/OnPlayerStreamIn.md",
"repo_id": "openmultiplayer",
"token_count": 378
} | 379 |
---
título: OnVehicleSirenStateChange
descripción: Este callback se llama cuando la sirena de un vehículo es alternada.
tags: ["vehicle"]
---
<VersionWarnES name='callback' version='SA-MP 0.3.7' />
## Descripción
Este callback se llama cuando la sirena de un vehículo es alternada.
| Name | Description |
| --------- | --------------------------------------------------------- |
| playerid | El ID del jugador que alternó la sirena (conductor). |
| vehicleid | El ID del vehículo en el que la sirena fue alternada. |
| newstate | 0 si la sirena se apagó, 1 si se prendió. |
## Devoluciones
1 - Prevendrá a otros filterscripts de recibir este callback.
0 - Indica que este callback será pasado al siguiente filterscript.
Siempre se llama primero en filterscripts.
## Ejemplos
```c
public OnVehicleSirenStateChange(playerid, vehicleid, newstate)
{
if (newstate)
{
GameTextForPlayer(playerid, "~W~Sirena ~G~prendida", 1000, 3);
}
else
{
GameTextForPlayer(playerid, "~W~Sirena ~r~apagada", 1000, 3);
}
return 1;
}
```
## Notas
:::tip
Este callback solo se llama cuando la sirena de un vehículo se enciende o apaga, NO cuando la sirena alternativa está en uso (sosteniendo la bocina).
:::
## Funciones Relacionadas
- [GetVehicleParamsSirenState](../functions/GetVehicleParamsSirenState): Verifica si la sirena de un vehículo está encendida o apagada.
| openmultiplayer/web/docs/translations/es/scripting/callbacks/OnVehicleSirenStateChange.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/es/scripting/callbacks/OnVehicleSirenStateChange.md",
"repo_id": "openmultiplayer",
"token_count": 612
} | 380 |
---
title: OnPlayerConnect
description: این کالبک وقتی فرا خوانده میشود که بازیکن به سرور متصل می شود.
tags: ["player"]
---
<div dir="rtl" style={{ textAlign: "right" }}>
## توضیحات
این کالبک وقتی فرا خوانده میشود که بازیکن به سرور متصل می شود.
## مقادیر برگشتی
0 - از دریافت این کالبک به دیگر فیلتر اسکریپت ها جلوگیری میکند.
1 - نشان میدهد که این کالبک به فیلتر اسکریپت بعدی انتقال داده می شود.
این همیشه ابتدا در فیلتر اسکریپت ها فرا خوانده می شود.
## مثال ها
</div>
```c
public OnPlayerConnect(playerid)
{
new
string[64],
playerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, playerName, MAX_PLAYER_NAME);
format(string, sizeof string, "%s be server peyvast. Khosh amadid!", playerName);
SendClientMessageToAll(0xFFFFFFAA, string);
return 1;
}
```
<div dir="rtl" style={{ textAlign: "right" }}>
## نکته ها
:::tip
این کالبک توسط NPC نیز قابل فرا خوانی است.
:::
## تابع های مرتبط
</div> | openmultiplayer/web/docs/translations/fa/scripting/callbacks/OnPlayerConnect.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/fa/scripting/callbacks/OnPlayerConnect.md",
"repo_id": "openmultiplayer",
"token_count": 696
} | 381 |
---
title: OnActorStreamOut
description: This callback is called when an actor is streamed out by a player's client.
tags: []
---
<VersionWarn name='callback' version='SA-MP 0.3.7' />
## Description
Ang callback na ito ay natatawag kapag ang actor ay na streamed-out na sa player.
| Pangalan | Deskripsyon |
| ----------- | -------------------------------------------------------------- |
| actorid | Ang ID ng actor na na-streamed out sa player. |
| forplayerid | Ang ID ng player na pinag stream-outan ng actor. |
## Returns
Lagi itong na tatawag una sa mga filterscript.
## Examples
```c
public OnActorStreamOut(actorid, forplayerid)
{
new string[40];
format(string, sizeof(string), "Ang actor %d ay hindi na naka stream para sa iyo.", actorid);
SendClientMessage(forplayerid, 0xFFFFFFFF, string);
return 1;
}
```
## Mga Dapat Unawain
<TipNPCCallbacks />
## Mga Related na Callbacks
| openmultiplayer/web/docs/translations/fil/scripting/callbacks/OnActorStreamOut.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/fil/scripting/callbacks/OnActorStreamOut.md",
"repo_id": "openmultiplayer",
"token_count": 385
} | 382 |
---
title: OnNPCSpawn
description: Tinatawag ang callback na ito kapag nagkaroon ng NPC.
tags: ["npc"]
---
## Description
Tinatawag ang callback na ito kapag nagkaroon ng NPC.
## Examples
```c
public OnNPCSpawn()
{
print("NPC spawned");
SendChat("Hello World. I'm a bot.");
return 1;
}
``` | openmultiplayer/web/docs/translations/fil/scripting/callbacks/OnNPCSpawn.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/fil/scripting/callbacks/OnNPCSpawn.md",
"repo_id": "openmultiplayer",
"token_count": 121
} | 383 |
---
title: OnVehicleSpawn
description: This callback is called when a vehicle respawns.
tags: ["vehicle"]
---
:::warning
Ang callback na ito ay tinatawag **lamang** kapag ang sasakyan ay **muling** umusbong! CreateVehicle at AddStaticVehicle(Ex) ay **hindi** magti-trigger ng callback na ito.
:::
## Paglalarawan
Ang callback na ito ay tinatawag kapag ang isang sasakyan ay nag respawn.
| Name | Description |
| --------- | ----------------------------------- |
| vehicleid | Ang ID ng sasakyan na nag respawn. |
## Returns
0 - Pipigilan ang iba pang mga filterscript mula sa pagtanggap ng callback na ito.
1 - Isinasaad na ang callback na ito ay ipapasa sa susunod na filterscript.
Lagi itong na tatawag una sa mga filterscript.
## Halimbawa ng Paggamit
```c
public OnVehicleSpawn(vehicleid)
{
printf("Vehicle %i spawned!",vehicleid);
return 1;
}
```
## Mga Kaugnay na Callbacks
Maaaring maging kapaki-pakinabang ang mga sumusunod na callback, dahil nauugnay ang mga ito sa callback na ito sa isang paraan o iba pa.
- [OnVehicleDeath](./OnVehicleDeath): Ang callback na ito ay tinatawag kapag nasira ang isang sasakyan.
- [OnPlayerSpawn](./OnPlayerSpawn): Tinatawag ang callback na ito kapag nag-spawn ang isang player.
## Mga Kaugnay na Functions
Maaaring maging kapaki-pakinabang ang mga sumusunod na function, dahil nauugnay ang mga ito sa callback na ito sa isang paraan o iba pa.
- [SetVehicleToRespawn](../functions/SetVehicleToRespawn): Respawn ang sasakyan.
- [CreateVehicle](../functions/CreateVehicle): Gumawa ng sasakyan. | openmultiplayer/web/docs/translations/fil/scripting/callbacks/OnVehicleSpawn.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/fil/scripting/callbacks/OnVehicleSpawn.md",
"repo_id": "openmultiplayer",
"token_count": 582
} | 384 |
---
title: ApplyActorAnimation
description: Mag-apply ng animation sa isang artista.
tags: []
---
<VersionWarn version='SA-MP 0.3.7' />
## Description
Mag-apply ng animation sa isang artista.
| Name | Description |
| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| actorid | Ang ID ng aktor kung saan ilalapat ang animation. |
| animlib[] | Ang library ng animation kung saan maglalapat ng animation. |
| animname[] | Ang pangalan ng animation na ilalapat, sa loob ng tinukoy na library. |
| fDelta | Ang bilis ng paglalaro ng animation (gamitin ang 4.1). |
| loop | Kung itatakda sa 1, mag-loop ang animation. Kung nakatakda sa 0, magpe-play ang animation nang isang beses. |
| lockx | Kung itatakda sa 0, ibabalik ang aktor sa kanilang lumang X coordinate kapag kumpleto na ang animation (para sa mga animation na gumagalaw sa aktor gaya ng paglalakad). 1 hindi na sila ibabalik sa dati nilang posisyon. |
| locky | Pareho sa itaas ngunit para sa Y axis. Dapat panatilihing pareho sa nakaraang parameter. |
| freeze | Ang pagtatakda nito sa 1 ay mag-freeze ng isang aktor sa dulo ng animation. 0 ay hindi. |
| time | Timer sa millisecond. Para sa isang walang katapusang loop dapat itong 0. |
## Returns
1: Matagumpay na naisakatuparan ang function.
0: Nabigo ang function na isagawa. Ang aktor na tinukoy ay wala.
## Examples
```c
new gMyActor;
public OnGameModeInit()
{
gMyActor = CreateActor(179, 316.1, -134.0, 999.6, 90.0); // Actor bilang salesperson sa Ammunation
ApplyActorAnimation(gMyActor, "DEALER", "shop_pay", 4.1, 0, 0, 0, 0, 0); // Pay anim
return 1;
}
```
## Notes
:::tip
Dapat mong paunang i-load ang animation library para sa player na pag-aaplayan ng aktor ng animation, at hindi para sa aktor. Kung hindi, hindi mailalapat ang animation sa aktor hanggang sa muling maipatupad ang function.
:::
## Related Functions
- [ClearActorAnimations](ClearActorAnimations): I-clear ang anumang mga animation na inilapat sa isang aktor. | openmultiplayer/web/docs/translations/fil/scripting/functions/ApplyActorAnimation.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/fil/scripting/functions/ApplyActorAnimation.md",
"repo_id": "openmultiplayer",
"token_count": 1921
} | 385 |
---
title: DestroyPickup
description: Sinisira ang isang pickup na ginawa gamit ang CreatePickup.
tags: []
---
## Description
Sinisira ang isang pickup na ginawa gamit ang CreatePickup.
| Name | Description |
| ------ | ----------------------------------------------------------- |
| pickup | Ang ID ng pickup na sisirain (nirereturn ng CreatePickup). |
## Returns
Ang function na ito ay hindi nagbabalik ng anumang value.
## Examples
```c
// Gumawa ng pickup para sa armor.
pickup_armour = CreatePickup ( 1242, 2, 1503.3359, 1432.3585, 10.1191 );
// mamaya
DestroyPickup(pickup_armour);
```
## Related Functions
- [CreatePickup](CreatePickup): Gumawa ng pickup.
- [OnPlayerPickUpPickup](../callbacks/OnPlayerPickUpPickup): Tinatawag kapag may player na kumuha ng pickup. | openmultiplayer/web/docs/translations/fil/scripting/functions/DestroyPickup.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/fil/scripting/functions/DestroyPickup.md",
"repo_id": "openmultiplayer",
"token_count": 302
} | 386 |
---
title: GetPlayerTeam
description: Kunin ang ID ng koponan kung nasaan ang manlalaro.
tags: ["player"]
---
## Description
Kunin ang ID ng koponan kung nasaan ang manlalaro.
| Name | Description |
| -------- | ---------------------------------------- |
| playerid | Ang ID ng manlalaro para makuha ang koponan ng. |
## Returns
0-254: Ang koponan ng manlalaro. (0 ay isang wastong koponan)
255: Tinukoy bilang NO_TEAM. Ang manlalaro ay wala sa alinmang koponan.
-1: Nabigo ang function na isagawa. Hindi konektado ang player.
## Examples
```c
enum
{
TEAM_ONE = 1,
TEAM_TWO
};
public OnPlayerSpawn(playerid)
{
// Ang mga manlalaro na nasa team 1 ay dapat mag-spawn sa Las Venturas airport.
if (GetPlayerTeam(playerid) == TEAM_ONE)
{
SetPlayerPos(playerid, 1667.8909, 1405.5618, 10.7801);
}
return 1;
}
```
## Related Functions
- [SetPlayerTeam](SetPlayerTeam): Magtakda ng koponan ng manlalaro.
- [SetTeamCount](SetTeamCount): Itakda ang bilang ng mga team na available. | openmultiplayer/web/docs/translations/fil/scripting/functions/GetPlayerTeam.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/fil/scripting/functions/GetPlayerTeam.md",
"repo_id": "openmultiplayer",
"token_count": 425
} | 387 |
---
title: SetSVarFloat
description: Magtakda ng server variable na float.
tags: []
---
<VersionWarn version='SA-MP 0.3.7 R2' />
## Description
Magtakda ng server variable na float.
| Name | Description |
| ----------- | -------------------------------- |
| varname[] | Ang pangalan ng server variable. |
| float_value | Ang float na itatakda. |
## Returns
1: Matagumpay na naisakatuparan ang function.
0: Nabigo ang function na isagawa. Ang variable na pangalan ay null o higit sa 40 character.
## Examples
```c
// itakda ang "Version"
SetSVarFloat("Version", 0.37);
// magpi-print ng version na mayroon ang server
printf("Version: %f", GetSVarFloat("Version"));
```
## Related Functions
- [SetSVarInt](SetSVarInt): Magtakda ng integer para sa server variable.
- [GetSVarInt](GetSVarInt): Kumuha ng player server bilang integer.
- [SetSVarString](SetSVarString): Magtakda ng string para sa server variable.
- [GetSVarString](GetSVarString): Kunin ang dating itinakda na string mula sa isang server variable.
- [GetSVarFloat](GetSVarFloat): Kunin ang dating itinakda na float mula sa isang server variable.
- [DeleteSVar](DeleteSVar): Magtanggal ng server variable. | openmultiplayer/web/docs/translations/fil/scripting/functions/SetSVarFloat.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/fil/scripting/functions/SetSVarFloat.md",
"repo_id": "openmultiplayer",
"token_count": 419
} | 388 |
---
title: floatfract
description: Kunin ang fractional na bahagi ng float.
tags: ["math", "floating-point"]
---
<LowercaseNote />
## Description
Kunin ang fractional na bahagi ng float. Nangangahulugan ito ng halaga ng mga numero pagkatapos ng decimal point.
| Name | Description |
| ----- | ---------------------------------------- |
| value | Ang float para makuha ang fractional na bahagi ng. |
## Returns
Ang fractional na bahagi ng float, bilang float value.
## Examples
```c
new Float:fFract = floatfract(3.14159); // Magbabalik nang 0.14159
```
## Related Functions
- [floatround](floatround): I-convert ang isang float sa isang integer (rounding). | openmultiplayer/web/docs/translations/fil/scripting/functions/floatfract.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/fil/scripting/functions/floatfract.md",
"repo_id": "openmultiplayer",
"token_count": 242
} | 389 |
---
title: NPC:OnRecordingPlaybackEnd
description: Cette callback est appelée lorsqu'un fichier enregistré en cours de reproduction avec NPC:StartRecordingPlayback a atteint sa fin.
tags: []
---
## Paramètres
Cette callback est appelée lorsqu'un fichier enregistré en cours de reproduction avec NPC:StartRecordingPlayback a atteint sa fin.
## Description
```c
public OnRecordingPlaybackEnd()
{
StartRecordingPlayback(PLAYER_RECORDING_TYPE_DRIVER, "all_around_lv_bus"); //Cela redémarrerait le fichier enregistré une fois la reproduction terminée.
}
```
| openmultiplayer/web/docs/translations/fr/scripting/Callbacks/NPC_OnRecordingPlaybackEnd.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/fr/scripting/Callbacks/NPC_OnRecordingPlaybackEnd.md",
"repo_id": "openmultiplayer",
"token_count": 191
} | 390 |
---
title: OnNPCModeExit
description: Ce rappel est appelé lorsque le script d'un PNJ est déchargé.
tags: ["npc"]
---
## Description
Ce rappel est appelé lorsque le script d'un PNJ est déchargé.
## Exemples
```c
public OnNPCModeExit()
{
print("Le script du PNJ a été déchargé");
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.
- [OnNPCModeInit](OnNPCModeInit): Ce rappel est appelé lorsque le script d'un PNJ est chargé.
| openmultiplayer/web/docs/translations/fr/scripting/Callbacks/OnNPCModeExit/0 | {
"file_path": "openmultiplayer/web/docs/translations/fr/scripting/Callbacks/OnNPCModeExit",
"repo_id": "openmultiplayer",
"token_count": 211
} | 391 |
---
title: OnPlayerEditObject
description: Cette callback est appelée quand un joueur a fini d'éditer un objet (EditObject/EditPlayerObject).
tags: ["player"]
---
## Paramètres
Cette callback est appelée quand un joueur a fini d'éditer un objet (EditObject/EditPlayerObject).
| Nom | Description |
|--------------------------------|-----------------------------------------------------------------|
| `int` playerid | ID du joueur qui a édité l'objet |
| `int` playerobject | **0** si c'est un global object, **1** si c'est un playerobject |
| `int` objectid | ID de l'objet édité |
| `int` EDIT_RESPONSE:response | Le [type de réponse](../resources/objecteditionresponsetypes) |
| `float` Float:fX | Offset X de l'objet qui a été édité |
| `float` Float:fY | Offset Y de l'objet qui a été édité |
| `float` Float:fZ | Offset Z de l'objet qui a été édité |
| `float` Float:fRotX | Rotation X de l'objet qui a été édité |
| `float` Float:fRotY | Rotation Y de l'objet qui a été édité |
| `float` Float:fRotZ | Rotation Z de l'objet qui a été édité |
## Valeur de retour
**1** - Autorise la callback à être appelée par un autre script.
**0** - Refuser que la callback soit appelée ailleurs.
## Exemple
```c
public OnPlayerEditObject(playerid, playerobject, objectid, EDIT_RESPONSE:response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ)
{
new
Float: oldX,
Float: oldY,
Float: oldZ,
Float: oldRotX,
Float: oldRotY,
Float: oldRotZ;
GetObjectPos(objectid, oldX, oldY, oldZ);
GetObjectRot(objectid, oldRotX, oldRotY, oldRotZ);
if (!playerobject) // Si c'est un global object = synchronise la position pour les autres joueurs
{
if (!IsValidObject(objectid))
{
return 1;
}
SetObjectPos(objectid, fX, fY, fZ);
SetObjectRot(objectid, fRotX, fRotY, fRotZ);
}
switch (response)
{
case EDIT_RESPONSE_FINAL:
{
// Le joueur clique sur l'icône de sauvegarde
// C'est ici que vous sauvegardez, par exemple, la nouvelle Rotation, etc.
}
case EDIT_RESPONSE_CANCEL:
{
// Le joueur a abandonné, donc l'objet regagne sa position d'avant l'édition.
if (!playerobject) //Object is not a playerobject
{
SetObjectPos(objectid, oldX, oldY, oldZ);
SetObjectRot(objectid, oldRotX, oldRotY, oldRotZ);
}
else
{
SetPlayerObjectPos(playerid, objectid, oldX, oldY, oldZ);
SetPlayerObjectRot(playerid, objectid, oldRotX, oldRotY, oldRotZ);
}
}
}
return 1;
}
```
## Astuces
:::warning
Lorsque vous utilisez 'EDIT_RESPONSE_UPDATE', sachez que la callback ne sera pas appelée lors de la publication d'une édition en cours entraînant une désynchronisation de la dernière édition de 'EDIT_RESPONSE_UPDATE' par rapport à la position actuelle des objets.
:::
## Fonctions connexes
- [EditObject](../functions/EditObject): Édite un objet.
- [CreateObject](../functions/CreateObject): Créer un objet.
- [DestroyObject](../functions/DestroyObject): Détruit un objet.
- [MoveObject](../functions/MoveObject): Déplace un objet.
| openmultiplayer/web/docs/translations/fr/scripting/Callbacks/OnPlayerEditObject.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/fr/scripting/Callbacks/OnPlayerEditObject.md",
"repo_id": "openmultiplayer",
"token_count": 1847
} | 392 |
---
title: OnPlayerPickUpPickup
description: Appelée lorsqu'un joueur prend un pickup crée via CreatePickup.
tags: ["player"]
---
## Paramètres
Appelée lorsqu'un joueur prend un pickup crée via CreatePickup.
| Nom | Description |
| -------- | ------------------------------------------ |
| `int` playerid | L'ID du joueur qui a prit le pickup. |
| `int` pickupid | L'ID du pickup que le joueur a prit. |
## 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
new pickup_Cash;
new pickup_Health;
public OnGameModeInit()
{
pickup_Cash = CreatePickup(1274, 2, 0.0, 0.0, 9.0);
pickup_Health = CreatePickup(1240, 2, 0.0, 0.0, 9.0);
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if (pickupid == pickup_Cash)
{
GivePlayerMoney(playerid, 1000);
}
else if (pickupid == pickup_Health)
{
SetPlayerHealth(playerid, 100.0);
}
return 1;
}
```
## Fonctions connexes
- [CreatePickup](../functions/CreatePickup): Créer un pickup.
- [DestroyPickup](../functions/DestroyPickup): Détruit un pickup.
| openmultiplayer/web/docs/translations/fr/scripting/Callbacks/OnPlayerPickUpPickup.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/fr/scripting/Callbacks/OnPlayerPickUpPickup.md",
"repo_id": "openmultiplayer",
"token_count": 529
} | 393 |
---
title: OnPlayerWeaponShot
description: Cette fonction est appelée lorsqu'un joueur tire avec une arme à feu.
tags: ["player"]
---
## Paramètres
Cette fonction est appelée lorsqu'un joueur tire avec une arme à feu. Si un conducteur tire depuis son véhicule, la callback ne sera pas appelée. En revanche, si un passager tire depuis son véhicule, la callback sera bel et bien appelée.
| Nom | Description |
|-------------------------------|---------------------------------------------------------------------------------------------------------|
| `int` playerid | L'ID du joueur qui tire |
| `int` WEAPON:weaponid | L'ID de l'[arme](../resources/weaponids) qui tire |
| `int` BULLET_HIT_TYPE:hittype | Le [type](../resources/bullethittypes) de cible touchée _(rien, joueur, véhicule, ou objet(de joueur))_ |
| `int` hitid | L'ID du joueur, véhicule ou objet touché |
| `float` Float:fX | Les coordonnées X touchée par le tir |
| `float` Float:fY | Les coordonnées Y touchée par le tir |
| `float` Float:fZ | Les coordonnées Z touchée par le tir |
## Valeur de retour
**0** - Empêche le tir de causer des dégâts.
**1** - Autorise le tir à causer des dégâts.
## Exemple
```c
public OnPlayerWeaponShot(playerid, WEAPON:weaponid, BULLET_HIT_TYPE:hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
new szString[144];
format(szString, sizeof(szString), "L'arme %i vient de faire feu. hittype: %i hitid: %i position: %f, %f, %f", weaponid, hittype, hitid, fX, fY, fZ);
SendClientMessage(playerid, -1, szString);
return 1;
}
```
## Astuces
:::tip
Si la cible est :
* `BULLET_HIT_TYPE_NONE` : les variables `fX`, `fY` et `fZ` seront égales à des coordonnées normales ;
* Autre : Les variables `fX`, `fY` et `fZ` seront généralement décalés du centre de hitid.
:::
:::tip
[GetPlayerLastShotVectors](../functions/GetPlayerLastShotVectors) peut être utilisé dans cette callback pour plus de détails sur les vecteurs de la balle.
:::
:::warning
Bugs connus :
- N'est pas appelé si vous avez tiré dans le véhicule en tant que conducteur ou si vous regardez derrière avec la visée activée (tir en l'air).
- Il est appelé `BULLET_HIT_TYPE_VEHICLE` avec le `hitid` correct _(le véhicule du joueur touché)_ si vous tirez sur un joueur qui se trouve dans un véhicule. Il ne s'appellera pas du tout `BULLET_HIT_TYPE_PLAYER`.
- Partiellement corrigé en 0.3.7 : Si de fausses données d'armes sont envoyées par un utilisateur malveillant, d'autres clients joueurs peuvent se bloquer ou planter. Pour lutter contre cela, vérifiez si l'arme signalée peut réellement tirer des balles.
:::
## Fonctions connexes
- [GetPlayerLastShotVectors](../functions/GetPlayerLastShotVectors): Récupère le vecteur du dernier coup tiré par un joueur.
| openmultiplayer/web/docs/translations/fr/scripting/Callbacks/OnPlayerWeaponShot.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/fr/scripting/Callbacks/OnPlayerWeaponShot.md",
"repo_id": "openmultiplayer",
"token_count": 1670
} | 394 |
---
title: AddCharModel
description : Ajoute un nouveau modèle de personnage personnalisé à télécharger.
tags: []
---
<VersionWarn version='SA-MP 0.3.DL R1' />
## Description
Ajoute un nouveau modèle de personnage personnalisé à télécharger. Les fichiers modèles seront stockés dans le dossier Documents\GTA San Andreas User Files\SAMP\cache du lecteur sous le dossier IP et port du serveur dans un nom de fichier au format CRC.
| Nom | Description |
| ------- | -------------------------------------------------- -----------------------------------------------------------------------------------------|
| baseid | L'ID du modèle de skin de base à utiliser (comportement du personnage et personnage d'origine à utiliser lorsque le téléchargement échoue). |
| newid | Le nouvel ID de modèle de skin allait de 20 000 à 30 000 (10 000 emplacements) à utiliser ultérieurement avec SetPlayerSkin |
| dffname | Nom du fichier de collision de modèles .dff situé dans le dossier du serveur de modèles par défaut (paramètre artpath). |
| txdname | Nom du fichier de texture de modèle .txd situé dans le dossier du serveur de modèles par défaut (paramètre artpath). |
## Retour
1 : La fonction s'est exécutée avec succès.
0 : La fonction n'a pas pu s'exécuter.
## Exemples
```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");
```
## Remarques
:::tip
useartwork doit d'abord être activé dans les paramètres du serveur pour que cela fonctionne
:::
:::warning
Il n'y a actuellement aucune restriction sur le moment où vous pouvez appeler cette fonction, mais sachez que si vous ne les appelez pas dans OnFilterScriptInit/OnGameModeInit, vous courez le risque que certains joueurs, qui sont déjà sur le serveur, n'aient pas téléchargé les modèles.
:::
## Fonctions associées
- [SetPlayerSkin](SetPlayerSkin): Définissez le skin d'un joueur.
- [GetPlayerSkin](GetPlayerSkin): Obtenez le skin d'un joueur.
| openmultiplayer/web/docs/translations/fr/scripting/functions/AddCharModel.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/fr/scripting/functions/AddCharModel.md",
"repo_id": "openmultiplayer",
"token_count": 971
} | 395 |
---
title: CancelEdit
description: Visszavonja a szerkesztési módot a játékos számára.
tags: []
---
## Leírás
Visszavonja a szerkesztési módot a játékos számára.
| Név | Leírás |
| -------- | ------------------------------------------------------ |
| playerid | Annak a játékosnak az ID-je akinek vissza akarod vonni |
## Visszatérések
Ez a függvény nem ad vissza konkrét értékeket.
## Példák
```c
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp(cmdtext, "/stopedit", true))
{
CancelEdit(playerid);
SendClientMessage(playerid, 0xFFFFFFFF, "SZERVER: Abbahagytad az objektum szerkesztését!");
return 1;
}
return 0;
}
```
## Kapcsolódó funkciók
- [SelectObject](SelectObject): Egy objektumot kiválasztása.
- [EditObject](EditObject): Egy objektum szerkesztése.
- [EditPlayerObject](EditPlayerObject): Egy objektum szerkesztése.
- [EditAttachedObject](EditAttachedObject): Egy csatolt objektum szerkesztése.
- [CreateObject](CreateObject): Egy objektum létrehozása.
- [DestroyObject](DestroyObject): Egy objektum eltávolítása.
- [MoveObject](MoveObject): Egy objektum mozgatása. | openmultiplayer/web/docs/translations/hu/scripting/funcitons/CancelEdit.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/hu/scripting/funcitons/CancelEdit.md",
"repo_id": "openmultiplayer",
"token_count": 549
} | 396 |
---
title: OnFilterScriptExit
description: Callback ini akan terpanggil ketika filterscript dibongkar.
tags: []
---
## Deskripsi
Callback ini akan terpanggil ketika filterscript tidak dimuat lagi. Ini hanya terpanggil di dalam filterscript yang akan dibongkar.
## Contoh
```c
public OnFilterScriptExit()
{
print("\n--------------------------------------");
print(" Filterscript telah dibongkar");
print("--------------------------------------\n");
return 1;
}
```
## Fungsi Terkait
| openmultiplayer/web/docs/translations/id/scripting/callbacks/OnFilterScriptExit.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/id/scripting/callbacks/OnFilterScriptExit.md",
"repo_id": "openmultiplayer",
"token_count": 167
} | 397 |
---
title: OnPlayerEnterVehicle
description: Callback Ini di panggil ketika pemain mulai memasuki kendaraan, artinya pemain belum berada di kendaraan pada saat callback ini dipanggil.
tags: ["player", "vehicle"]
---
## Deskripsi
Callback Ini di panggil ketika pemain mulai memasuki kendaraan, artinya pemain belum berada di kendaraan pada saat callback ini dipanggil.
| Nama | Deskripsi |
| ----------- | ---------------------------------------------------- |
| playerid | ID pemain yang mencoba memasuki kendaraan. |
| vehicleid | ID kendaraan yang coba di masuki oleh pemain. |
| ispassenger | 0 jika masuk sebagai pengemudi. 1 jika masuk sebagai penumpang. |
## Returns
Ini selalu di panggil pertama dalam filtersciprt.
## Contoh
```c
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new string[128];
format(string, sizeof(string), "Kamu memasuki kendaraan %i", vehicleid);
SendClientMessage(playerid, 0xFFFFFFFF, string);
return 1;
}
```
## Catatan
:::tip
Callback ini di panggil ketika PEMAIN mulai memasuki kendaraan, bukan ketika pemain TELAH memasukinya. Lihat OnPlayerStateChange. Callback ini tetap dipanggil jika pemain di tolak masuk ke kendaraan (misalnya terkunci atau penuh).
:::
## Fungsi Terkait
- [PutPlayerInVehicle](../functions/PutPlayerInVehicle):
Masukkan pemain ke dalam kendaraan.
- [GetPlayerVehicleSeat](../functions/GetPlayerVehicleSeat): Memeriksa di kursi mana seorang pemain berada.
| openmultiplayer/web/docs/translations/id/scripting/callbacks/OnPlayerEnterVehicle.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/id/scripting/callbacks/OnPlayerEnterVehicle.md",
"repo_id": "openmultiplayer",
"token_count": 593
} | 398 |
---
title: ApplyAnimation
description: Digunakan untuk mengaplikasikan animasi ke pemain.
tags: []
---
## Deskripsi
Mengaplikasikan animasi ke pemain.
| Nama | Deskripsi |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| playerid | ID dari pemain yang akan di aplikasikan animasi |
| animlib[] | library animasi yang akan digunakan untuk mengaplikasikan animasi |
| animname[] | Nama animasi yang akan diterapkan, dengan library yang sudah ditentukan. |
| fDelta | Kecepatan untuk memainkan animasi (gunakan 4.1). |
| loop | Jika di atur menjadi 1, animasi akan melakukan perulangan. Jika di atur menjadi 0, animasi akan mengulang hanya sekali. |
| lockx | Jika di atur menjadi 0, pemain dikembalikan ke kordinat x lama mereka setelah animasi selesai (untuk animasi yang menggerakkan pemain seperti berjalan). 1 tidak akan mengembalikan ke yang lama. position. |
| locky | Sama seperti di atas tetapi untuk sumbu Y. Harus tetap sama dengan parameter sebelumnya. |
| freeze | Mengatur ke 1 akan membuat pemain membeku di akhir animasi. 0 tidak akan membeku. |
| time | Waktu dalam millidetik. Untuk pengulangan yang tidak pernah berakhir harus menggunakan 0. |
| forcesync | Mengaturnya menjadi 1 membuat server menyinkronkan animasi kepada semua pemain lain dalam radius streaming (opsional). 2 berfungsi sama dengan 1, tetapi hanya akan menerapkan animasi ke pemain yang di-streaming, tetapi bukan pemain yang sebenarnya sedang dianimasikan (berguna untuk animasi NPC dan animasi yang terus-menerus saat pemain sedang streaming) |
## Returns
Fungsi ini selalu mengembalikan 1, bahkan jika pemain yang ditentukan tidak ada, atau salah satu parameter tidak valid (misalkan library tidak valid).
## Contoh
```c
ApplyAnimation(playerid, "PED", "WALK_DRUNK", 4.1, 1, 1, 1, 1, 1, 1);
```
## Catatan
:::tip
parameter opsional 'forcesync' bawaannya adalah 0, dalam banyak kasus tidak diperlukan karena pemain menyinkronkan animasi itu sendiri. Parameter 'forcesync' dapat memaksa semua pemain yang dapat melihat 'playerid' untuk memutar animasi terlepas dari apakah pemain melakukan animasi itu atau tidak. Ini berguna dalam keadaan di mana pemain tidak dapat menyinkronkan animasi itu sendiri. Misalnya, mereka mungkin dijeda.
:::
:::Peringatan
Animasi yang invalid dapat menyebabkan game pemain menjadi crash/tidak berjalan.
:::
## Fungsi Terkait
- [ClearAnimations](ClearAnimations): membersihkan animasi pada pemain yang sedang berlangsung.
- [SetPlayerSpecialAction](SetPlayerSpecialAction): Mengatur tindakan khusus pemain.
| openmultiplayer/web/docs/translations/id/scripting/functions/ApplyAnimation.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/id/scripting/functions/ApplyAnimation.md",
"repo_id": "openmultiplayer",
"token_count": 3266
} | 399 |
---
title: SetVehiclePos
description: Set posisi pada kendaraaan.
tags: ["vehicle"]
---
## Deskripsi
Set posisi pada kendaraan.
| Nama | Deskripsi |
| --------- | -------------------------------------------- |
| vehicleid | ID Kendaraan yang ingin di set posisi |
| Float:x | Koordinat X untuk set posisi pada kendaraan. |
| Float:y | Koordinat Y untuk set posisi pada kendaraan. |
| Float:z | Koordinat Z untuk set posisi pada kendaraan. |
## Returns
1: Fungsi berhasil dijalankan.
0: Fungsi gagal dijalankan. Ini berarti kendaraan tidak ada.
## Contoh
```c
// Letakkan kendaraan player pada koordinat 0, 0, 3 (Tengah Map SA)
new vehicleid = GetPlayerVehicleID(playerid);
SetVehiclePos(vehicleid, 0, 0, 3);
```
## Catatan
:::warning
Kendaraan kosong tidak akan jatuh setelah diteleportasi ke udara.
:::
## Fungsi Terkait
- [SetPlayerPos](SetPlayerPos): Set player posisi.
- [GetVehiclePos](GetVehiclePos): Mendapatkan posisi kendaraan.
- [SetVehicleZAngle](SetVehicleZAngle): Atur arah kendaraan.
| openmultiplayer/web/docs/translations/id/scripting/functions/SetVehiclePos.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/id/scripting/functions/SetVehiclePos.md",
"repo_id": "openmultiplayer",
"token_count": 443
} | 400 |
---
id: dialogstyles
title: Dialog Styles
description: Informasi mengenai Gaya Dialog
---
:::note
- Pada [OnDialogResponse](../callbacks/OnDialogResponse), menekan **button1** menetapkan nilai **response** menjadi 1, sedangkan menekan **button2** menetapkan nilai **response** menjadi **0**.
- Setiap dialog bisa memiliki tombol ke-dua karena sifatnya opsional. Untuk menghilangkannya, cukup dikosongkan saja, seperti pada contoh pertama. Player tidak dapat menekan tombol tersebut, tapi player dapat menekan tombol ESC dan memicu [OnDialogResponse](../callbacks/OnDialogResponse) dengan **response** bernilai **0**.
- [ShowPlayerDialog](../functions/ShowPlayerDialog): Pewarnaan dapan digunakan di setiap string: **caption**, **info**, **button1**, dan **button2**.
:::
- Halaman ini mendeskripsikan perilaku dari [ShowPlayerDialog](../functions/ShowPlayerDialog) dan [OnDialogResponse](../callbacks/OnDialogResponse).
- Untuk melihat batasannya, kunjungi halaman [Batasan](../resources/limits).
- Untuk contoh responnya, berikut ini adalah kodenya:
```c
public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
{
printf( "playerid = %d, dialogid = ID_DIALOG_KAMU, response = %d, listitem = %d, inputtext = '%s' (size: %d)", playerid, response, listitem, inputtext, strlen( inputtext ) );
return 1;
}
```
## Gaya 0: `DIALOG_STYLE_MSGBOX`
Menampilkan:
![](/images/dialogStyles/Dialog_style_msgbox.png)
:::note
- **\t** menambah sebuah TAB (lebih banyak spasi).
- **\n** membuat sebuah baris baru.
- Pewarnaan tidak akan diatur ulang (_reset_) setelah \n \t
:::
```c
ShowPlayerDialog(playerid, ID_DIALOG_KAMU, DIALOG_STYLE_MSGBOX, "Judul", "Info\n\tInfo", "Tombol 1", "");
```
### Keluaran Respon
:::note
- **listitem** selalu bernilai **-1**.
- **inputtext** selalu kosong.
:::
```c
// Menekan tombol
playerid = 0, dialogid = ID_DIALOG_KAMU, response = 1, listitem = -1, inputtext = '' (size: 0)
// Menekan ESC (karena tombol ke-dua tidak tampil)
playerid = 0, dialogid = ID_DIALOG_KAMU, response = 0, listitem = -1, inputtext = '' (size: 0)
```
## Gaya 1: `DIALOG_STYLE_INPUT`
Menampilkan:
![](/images/dialogStyles/Dialog_style_input.png)
:::note
- **\t** menambah sebuah TAB (lebih banyak spasi).
- **\n** membuat sebuah baris baru.
- Pewarnaan tidak akan diatur ulang (_reset_) setelah \n \t
:::
```c
ShowPlayerDialog(playerid, ID_DIALOG_KAMU, DIALOG_STYLE_INPUT, "Judul", "Masukkan informasi berikut:", "Tombol 1", "Tombol 2");
```
### Keluaran respon
:::note
- **listitem** selalu bernilai **-1**.
- **inputtext** adalah teks yang ditulis oleh pengguna, termasuk warna-warnanya.
:::
```c
// menulis "input" and dan menekan tombol kiri
playerid = 0, dialogid = ID_DIALOG_KAMU, response = 1, listitem = -1, inputtext = 'input' (size: 5)
// menulis "input" and dan menekan tombol kanan
playerid = 0, dialogid = ID_DIALOG_KAMU, response = 0, listitem = -1, inputtext = 'input' (size: 5)
```
## Gaya 2: `DIALOG_STYLE_LIST`
Showing:
![](/images/dialogStyles/Dialog_style_list.png)
:::note
- **\t** menambah sebuah TAB (lebih banyak spasi).
- **\n** membuat sebuah baris baru.
- Pewarnaan tidak akan diatur ulang (_reset_) setelah \n \t
:::
```c
ShowPlayerDialog(playerid, ID_DIALOG_KAMU, DIALOG_STYLE_LIST, "Judul", "Item 0\n{FFFF00}Item 1\nItem 2", "Tombol 1", "Tombol 2");
```
### Keluaran Respon
:::note
- **listitem** adalah nomor dari nilai yang dipilih, dimulai dari **0**.
- **inputtext** adalah nilai yang terdapat pada listitem yang dipilih, tanpa warnanya.
:::
```c
// memilih item pada urutan pertama dan menekan tombol kiri
playerid = 0, dialogid = ID_DIALOG_KAMU, response = 1, listitem = 0, inputtext = 'Item 0' (size: 6)
// memilih item pada urutan pertama dan menekan tombol kanan
playerid = 0, dialogid = ID_DIALOG_KAMU, response = 0, listitem = 1, inputtext = 'Item 1' (size: 6)
```
## Gaya 3: `DIALOG_STYLE_PASSWORD`
:::note
- Serupa dengan **DIALOG_STYLE_INPUT**.
:::
Menampilkan:
![](/images/dialogStyles/Dialog_style_password.png)
:::note
- **\t** menambah sebuah TAB (lebih banyak spasi).
- **\n** membuat sebuah baris baru.
:::
```c
ShowPlayerDialog(playerid, ID_DIALOG_KAMU, DIALOG_STYLE_PASSWORD, "Caption", "Enter private information below:", "Button 1", "Button 2");
```
### Keluaran Respon
:::note
- **listitem** nilainya selalu **-1**.
- **inputtext** adalah teks yang ditulis oleh pengguna, termasuk warna-warnanya.
:::
```c
// menulis "input" dan menekan tombol kiri
playerid = 0, dialogid = ID_DIALOG_KAMU, response = 1, listitem = -1, inputtext = 'input' (size: 5)
// menulis "input" dan menekan tombol kanan
playerid = 0, dialogid = ID_DIALOG_KAMU, response = 0, listitem = -1, inputtext = 'input' (size: 5)
```
## Gaya 4: `DIALOG_STYLE_TABLIST`
:::tip
Gaya ini telah ditambahkan di **SA-MP 0.3.7** and tidak akan bekerja di versi sebelumnya!
:::
:::note
- Serupa dengan **DIALOG_STYLE_LIST**.
:::
Menampilkan:
![](/images/dialogStyles/Dialog_style_tablist.png)
:::note
- **\t** menambah sebuah TAB (lebih banyak spasi).
- **\n** membuat sebuah baris baru.
- Pewarnaan akan diatur ulang (_reset_) setelah \n \t
:::
```c
ShowPlayerDialog(playerid, ID_DIALOG_KAMU, DIALOG_STYLE_TABLIST, "Caption",
"Deagle\t$5000\t100\n\
{FF0000}Sawnoff\t{33AA33}$5000\t100\n\
Pistol\t$1000\t50",
"Button 1", "Button 2");
```
:::note
- **inputtext** teks yang berisi nilai dari **listitem** yang dipilih pada kolom pertama, tanpa warna-warnanya.
:::
```c
// memilih item pertama pada daftar dan menekan tombol kiri
playerid = 0, dialogid = ID_DIALOG_KAMU, response = 1, listitem = 0, inputtext = 'Deagle' (size: 6)
// memilih item ke-dua pada daftar dan menekan tombol kanan
playerid = 0, dialogid = ID_DIALOG_KAMU, response = 0, listitem = 1, inputtext = 'Sawnoff' (size: 7)
```
## Gaya 5: `DIALOG_STYLE_TABLIST_HEADERS`
:::tip
Gaya ini telah ditambahkan di **SA-MP 0.3.7** and tidak akan bekerja di versi sebelumnya!
:::
:::note
- Serupa dengan **DIALOG_STYLE_LIST**.
:::
Menampilkan:
![](/images/dialogStyles/Dialog_style_tablist_headers.png)
:::note
- **\t** menambah sebuah TAB (lebih banyak spasi).
- **\n** membuat sebuah baris baru.
- Pewarnaan akan diatur ulang setelah \n and \t. **info** pada baris pertama berisi header.
:::
```c
ShowPlayerDialog(playerid, ID_DIALOG_KAMU, DIALOG_STYLE_TABLIST_HEADERS, "Caption",
"Header 1\tHeader 2\tHeader 3\n\
Item 1 Column 1\tItem 1 Column 2\tItem 1 Column 3\n\
{FF0000}Item 2 Column 1\t{33AA33}Item 2 Column 2\tItem 2 Column 3",
"Button 1", "Button 2");
```
:::note
- **inputtext** berisi teks dari **listitem** yang dipilih pada kolom pertama, tanpa warna-warnanya.
:::
```c
// memilih item pertama dari daftar dan menekan tombol kiri
playerid = 0, dialogid = ID_DIALOG_KAMU, response = 1, listitem = 0, inputtext = 'Item 1 Column 1' (size: 15)
// memilih item ke-dua dari daftar dan menekan tombol kanan
playerid = 0, dialogid = ID_DIALOG_KAMU, response = 0, listitem = 1, inputtext = 'Item 2 Column 1' (size: 15)
```
| openmultiplayer/web/docs/translations/id/scripting/resources/dialogstyles.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/id/scripting/resources/dialogstyles.md",
"repo_id": "openmultiplayer",
"token_count": 2973
} | 401 |
---
id: vehiclehealth
title: Kesehatan Kendaraan
description: Nilai Kesehatan Kendaraan
---
| Kesehatan | Status Mesin |
| --------- | -------------------------------------------- |
| > 650 | Tidak Rusak |
| 650-550 | Berasap Putih |
| 550-390 | Berasap Abu-abu |
| 390-250 | Berasap Hitam |
| < 250 | Terbakar (akan meledak dalam beberapa detik) |
## Related Functions
- [SetVehicleHealth](../functions/SetVehicleHealth): Menetapkan kesehatannya kendaraan.
- [GetVehicleHealth](../functions/GetVehicleHealth): Mendapatkan kesehatannya kendaraan.
| openmultiplayer/web/docs/translations/id/scripting/resources/vehiclehealth.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/id/scripting/resources/vehiclehealth.md",
"repo_id": "openmultiplayer",
"token_count": 360
} | 402 |
---
title: Per-player variable system
description: Sistem per-player variable (atau pendeknya, PVar) adalah cara baru untuk membuat variabel player dalam bentuk yang efisien membuat method secara global, artinya mereka dapan menggunakan gamemode server dan filterscripts secara bersamaan.
---
Sistem per-player variable (atau pendeknya, PVar) adalah cara baru untuk membuat variabel player dalam bentuk yang efisien membuat method secara global, artinya mereka dapan menggunakan gamemode server dan filterscripts secara bersamaan.
Hal ini mirip dengan [SVars](servervariablesystem), namun dalam basis per-player. Lihat 2 post terakhir di dalam thread ini untuk mempelajari lebih lanjut perbedaan antara pawn properties dan PVars.
## Keuntungan
Sistem baru diperkenalkan di SA-MP 0.3a R5 server di update dengan beberapa keuntungan besar dalam membuat array sized MAX_PLAYERS.
- PVars dapat di bagi/akses keseluruh skrip gamemode dan filterscripts, memudahkan anda untuk memodularisasikan kodingan anda.
- PVars akan otomatis terhapus setelah player logout dari server (setelah OnPlayerDisconnect), berarti anda tidak perlu mereset secara manual variable untuk player selanjutnya bergabung.
- Tidak perlu struktur info enums/player yang kompleks.
- Menghemat memori dengan tidak mengalokasi elemen array pawn untuk playerids dimana tidak akan pernah digunakan.
- Anda dapat dengan mudah menghitung dan mencetak/menyimpan PVar list. Ini membuat debugging dan penyimpanan info player lebih mudah.
- Bahkan jika PVar belum dibuat, tetap akan mengembalikan nilai default 0.
- PVar dapat menyimpan string yang sangat besar menggunakan memori yang dialokasikan secara dinamis.
- Anda dapat Set, Get, Create PVar didalam ingame.
## Kelemahan
- PVars beberapa kali lebih lambat dari variabel biasa. Secara umum lebih menguntungkan untuk mengakali memori speed, daripada sebaliknya.
## Functions
Berikut adalah Functions untuk mengatur dan menerima player variable:
- [SetPVarInt](../scripting/functions/SetPVarInt) Mengatur sebuah integer dari sebuah player variable.
- [GetPVarInt](../scripting/functions/GetPVarInt) Mengambil nilai integer sebelumnya dari sebuah player variable.
- [SetPVarString](../scripting/functions/SetPVarString) Mengatur sebuah string dari sebuah player variable.
- [GetPVarString](../scripting/functions/GetPVarString) Mengambil nilai string sebelumnya dari sebuah player variable.
- [SetPVarFloat](../scripting/functions/SetPVarFloat) Mengatur sebuah float dari sebuah player variable.
- [GetPVarFloat](../scripting/functions/GetPVarFloat) Mengambil nilai float sebelumnya dari sebuah player variable.
- [DeletePVar](../scripting/functions/DeletePVar) Menghapus sebuah player variable.
```c
#define PLAYER_VARTYPE_NONE (0)
#define PLAYER_VARTYPE_INT (1)
#define PLAYER_VARTYPE_STRING (2)
#define PLAYER_VARTYPE_FLOAT (3)
```
| openmultiplayer/web/docs/translations/id/tutorials/perplayervariablesystem.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/id/tutorials/perplayervariablesystem.md",
"repo_id": "openmultiplayer",
"token_count": 1008
} | 403 |
---
title: AllowAdminTeleport
description: Ta funkcja określa, czy administratorzy RCON będą teleportowani do punktu docelowego, kiedy tylko go zaznaczą na mapie.
tags: []
---
:::warning
Ta funkcja od wersji 0.3d jest przestarzała. Sprawdź OnPlayerClickMap.
:::
## Opis
Ta funkcja określa, czy administratorzy RCON będą teleportowani do punktu docelowego, kiedy tylko go zaznaczą na mapie.
| Nazwa | Opis |
| ----- | ---------------------------- |
| allow | 0 - wyłączone, 1 - włączone. |
## Zwracane wartości
Ta funkcja nie zwraca żadnych konkretnych wartości.
## Przykłady
```c
public OnGameModeInit()
{
AllowAdminTeleport(1);
// Pozostałe rzeczy
return 1;
}
```
## Powiązane funkcje
- [IsPlayerAdmin](IsPlayerAdmin.md): Sprawdza, czy gracz jest zalogowany jako RCON.
- [AllowPlayerTeleport](AllowPlayerTeleport.md): Włącza graczom teleportowanie do punktów docelowych.
| openmultiplayer/web/docs/translations/pl/scripting/functions/AllowAdminTeleport.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/pl/scripting/functions/AllowAdminTeleport.md",
"repo_id": "openmultiplayer",
"token_count": 421
} | 404 |
---
title: atan
description: Podaje odwróconą wartość arcus tangensa w radianach.
tags: []
---
<LowercaseNote />
## Opis
Podaje odwróconą wartość arcus tangensa w radianach.
| Nazwa | Opis |
| ----------- | ------------- |
| Float:value | Arcus tangens |
## Zwracane wartości
Odwrócona wartość arcus tangensa w radianach.
## Examples
```c
public OnGameModeInit()
{
new Float:param, Float:result;
param = 1.0;
result = atan(param);
printf("Arcus tangens dla %f wynosi %f stopni.", param, result);
return 1;
}
```
## Related Functions
- [floatsin](floatsin.md): Podaje sinus dla konkretnego kąta.
- [floatcos](floatcos.md): Podaje cosinus dla konkretnego kąta.
- [floattan](floattan.md): Podaje tangens dla konkretnego kąta.
| openmultiplayer/web/docs/translations/pl/scripting/functions/atan.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/pl/scripting/functions/atan.md",
"repo_id": "openmultiplayer",
"token_count": 343
} | 405 |
---
title: OnFilterScriptInit
description: Esta callback é chamada quando um filterscript é inicializado.
tags: []
---
## Descrição
Esta callback é chamada quando um filterscript é inicializado. É apenas chamado dentro do filterscript que carregou.
## Exemplos
```c
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("O Filterscript carregou.");
print("--------------------------------------\n");
return 1;
}
```
## Funções Relacionadas
| openmultiplayer/web/docs/translations/pt-BR/scripting/callbacks/OnFilterScriptInit.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/pt-BR/scripting/callbacks/OnFilterScriptInit.md",
"repo_id": "openmultiplayer",
"token_count": 160
} | 406 |
---
title: OnPlayerCommandText
description: Esta callback é chamada quando o jogador entra com um comando na janela de chat do cliente.
tags: ["player"]
---
## Descrição
Esta callback é chamada quando o jogador entra com um comando na janela de chat do cliente. Comandos são qualquer coisa que iniciam com uma barra, EX: /help.
| Nome | Descrição |
| --------- | ----------------------------------------------- |
| playerid | O ID do jogador que entrou com um comando. |
| cmdtext[] | O comando que foi digitado (incluindo a barra). |
## 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 OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp(cmdtext, "/help", true))
{
SendClientMessage(playerid, -1, "SERVER: Este é o comando /help!");
return 1;
// Returnar 1 informa que o comando foi processado.
// OnPlayerCommandText não será chamado em outro script.
}
return 0;
// Retornar 0 informa que o comando não foi precessado pelo script.
// OnPlayerCommandText será chamado em outros scripts até que seja retornado 1.
// Se nenhum script retornar 1, uma mensagem irá aprecer: 'SERVER: Unknown Command'
}
```
## Notas
<TipNPCCallbacksPT />
## Funções Relacionadas
- [SendRconCommand](../functions/SendRconCommand.md): Envia um comando via RCON.
| openmultiplayer/web/docs/translations/pt-BR/scripting/callbacks/OnPlayerCommandText.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/pt-BR/scripting/callbacks/OnPlayerCommandText.md",
"repo_id": "openmultiplayer",
"token_count": 581
} | 407 |
---
title: OnPlayerLeaveCheckpoint
description: Esta callback é chamada quando um jogador sai de um checkpoint definido para eles por SetPlayerCheckpoint.
tags: ["player", "checkpoint"]
---
## Descrição
Esta callback é chamada quando um jogador sai de um checkpoint definido para eles por SetPlayerCheckpoint. Apenas um checkpoint pode ser definido por vez.
| Nome | Descrição |
| -------- | -------------------------------------------------- |
| playerid | O ID do jogador que saiu do respectivo checkpoint. |
## Retorno
Sempre é chamada primeiro em Filterscripts..
## Exemplos
```c
public OnPlayerLeaveCheckpoint(playerid)
{
printf("Jogador %i saiu do checkpoint!", playerid);
return 1;
}
```
## Notas
<TipNPCCallbacksPT />
## Funções Relacionadas
- [SetPlayerCheckpoint](../functions/SetPlayerCheckpoint): Cria o checkpoint para um jogador.
- [DisablePlayerCheckpoint](../functions/DisablePlayerCheckpoint): Desativa o atual checkpoint de um jogador.
- [IsPlayerInCheckpoint](../functions/IsPlayerInCheckpoint): Verifica se o jogador está em um checkpoint.
- [SetPlayerRaceCheckpoint](../functions/SetPlayerRaceCheckpoint): Cria um checkpoint de corrida para o jogador.
- [DisablePlayerRaceCheckpoint](../functions/DisablePlayerRaceCheckpoint): Desativa o atual checkpoint de corrida para o jogador.
- [IsPlayerInRaceCheckpoint](../functions/IsPlayerInRaceCheckpoint): Verifica se o jogador está em um checkpoint de corrida.
| openmultiplayer/web/docs/translations/pt-BR/scripting/callbacks/OnPlayerLeaveCheckpoint.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/pt-BR/scripting/callbacks/OnPlayerLeaveCheckpoint.md",
"repo_id": "openmultiplayer",
"token_count": 482
} | 408 |
---
title: OnRconLoginAttempt
description: Essa callback é executada quando algum jogador tenta login na RCON; seja ele bem sucedido ou não.
tags: []
---
## Descrição
Essa callback é executada quando algum jogador tenta login na RCON; seja ele bem sucedido ou não.
| Nome | Descrição |
| ---------- | ------------------------------------------------------- |
| ip[] | IP do jogador que tentou fazer login na RCON. |
| password[] | A senha utilizada no login. |
| success | 0 caso a senha esteja incorreta, 1 caso esteja correta. |
## Retornos
Sempre executada primeiro nos filterscripts.
## Exemplos
```c
public OnRconLoginAttempt(ip[], password[], success)
{
if (!success) //Caso a senha esteja incorreta
{
printf("FAILED RCON LOGIN BY IP %s USING PASSWORD %s",ip, password);
new pip[16];
for(new i = GetPlayerPoolSize(); i != -1; --i) //Faz um loop por todos os jogadores.
{
GetPlayerIp(i, pip, sizeof(pip));
if (!strcmp(ip, pip, true)) //Caso o IP do jogador seja o mesmo que falhou ao realizar o login.
{
SendClientMessage(i, 0xFFFFFFFF, "Senha Incorreta! Grande abraço parça!"); //Envia uma mensagem de despedida :)
Kick(i); //Kicka o jogador.
}
}
}
return 1;
}
```
## Notas
:::tip
Essa callback é executada somente quando o comando /rcon login é utilizado in-game. É executada somente quando o jogador não está logado na RCON. Quando o jogador já está logado na RCON a callback OnRconCommand é executada ao invés dessa.
:::
## Funções Relacionadas
- [IsPlayerAdmin](../functions/IsPlayerAdmin): Verifica se o jogador está logado na RCON.
- [SendRconCommand](../functions/SendRconCommand): Envia um comando RCON pelo script.
| openmultiplayer/web/docs/translations/pt-BR/scripting/callbacks/OnRconLoginAttempt.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/pt-BR/scripting/callbacks/OnRconLoginAttempt.md",
"repo_id": "openmultiplayer",
"token_count": 813
} | 409 |
---
title: AddPlayerClassEx
description: Esta função é exatamente igual à função AddPlayerClass, com a adição de um parâmetro de equipe.
tags: []
---
## Descrição
Esta função é exatamente igual à função AddPlayerClass, com a adição de um parâmetro de equipe.
| Nome | Descrição |
| -------------- | --------------------------------------------------------- |
| teamid | A equipe em que o jogador deverá dar spawn. |
| modelid | A skin com a qual o jogador irá dar spawn. |
| Float: spawn_x | A coordenada X do ponto de spawn desta classe. |
| Float: spawn_y | A coordenada Y do ponto de spawn desta classe. |
| Float: spawn_z | A coordenada Z do ponto de desova desta classe. |
| Float: z_angle | O ângulo Z que o jogador deverá ser voltado após o spawn. |
| weapon1 | A primeira arma com que o jogador irá dar spawn. |
| weapon1_ammo | A quantidade de munição para a arma primária. |
| weapon2 | A segunda arma com que o jogador irá dar spawn. |
| weapon2_ammo | A quantidade de munição para a arma secundária. |
| weapon3 | A terceira arma com que o jogador irá dar spawn. |
| weapon3_ammo | A quantidade de munição para a arma terciária. |
## Retorno
O ID da classe que acabou de ser adicionada.
319 se o limite da classe (320) foi atingido. O maior ID de classe possível é 319.
## Exemplos
```c
public OnGameModeInit()
{
// Os jogadores podem dar spawn com:
// Personagem do CJ (ID 0) no time 1.
// Personagem do The Truth (ID 1) no time 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;
}
```
## Notas
:::tip
A identificação máxima da classe é 319 (começando em 0, portanto, um total de 320 classes). Quando esse limite for atingido, quaisquer outras classes adicionadas substituirão a ID 319.
:::
## Funções Relacionadas
- [AddPlayerClass](../functions/AddPlayerClass.md): Adiciona uma classe à seleção de classes.
- [SetSpawnInfo](../functions/SetSpawnInfo.md): Define a configuração de spawn para um jogador.
- [SetPlayerTeam](../functions/SetPlayerTeam.md): Define o time de um jogador.
- [SetPlayerSkin](../functions/SetPlayerSkin.md): Define a skin (personagem) de um jogador.
| openmultiplayer/web/docs/translations/pt-BR/scripting/functions/AddPlayerClassEx.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/pt-BR/scripting/functions/AddPlayerClassEx.md",
"repo_id": "openmultiplayer",
"token_count": 1069
} | 410 |
---
title: BlockIpAddress
description: Bloqueia um endereço de IP de comunicar com o servidor por um determinado período de tempo (globs são permitidos).
tags: []
---
## Descrição
Bloqueia um endereço de IP de comunicar com o servidor por um determinado período de tempo (globs são permitidos). Jogadores tentando se conectar ao servidor com um endereço de IP bloqueado receberão a mensagem "Your are banned from this server". Jogadores que estão online no IP especificado, antes do bloqueio, irão perder a conexão após alguns segundos, e ao se conectar, irão receber a mesma mensagem.
| Nome | Descrição |
| ---------- | ----------------------------------------------------------------------------------------------------- |
| ip_address | O IP a bloquear. |
| timems | O tempo (em milisegundos) que a conexão será bloqueada. 0 pode ser usado para um bloqueio indefinido. |
## Retorno
Esta função não retorna nenhum valor específico.
## Exemplos
```c
public OnRconLoginAttempt(ip[], password[], success)
{
if (!success) // Se eles fornecerem uma senha errada
{
BlockIpAddress(ip, 60 * 1000); // Bloquear as conexões deste IP por um minuto.
}
return 1;
}
```
## Notas
:::tip
Globs podem ser usados nesta função, por exemplo bloquear o IP '6.9._._' bloqueará todos os IPs onde os primeiros dois octetos são 6 e 9 respectivamente. Qualquer número pode estar no lugar do underscore.
:::
## Funções Relacionadas
- [UnBlockIpAddress](UnBlockIpAddress): Desbloqueie um IP que foi bloqueado anteriormente.
- [OnIncomingConnection](../callbacks/OnIncomingConnection): É chamado quando um jogador está tentando se conectar ao servidor.
| openmultiplayer/web/docs/translations/pt-BR/scripting/functions/BlockIpAddress.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/pt-BR/scripting/functions/BlockIpAddress.md",
"repo_id": "openmultiplayer",
"token_count": 780
} | 411 |
---
title: GangZoneShowForPlayer
description: Mostra a gangzone para um jogador.
tags: ["player", "gangzone"]
---
## Descrição
Mostra a gangzone para um jogador. Deve ser criado com GangZoneCreate primeiro.
| Nome | Descrição |
| -------- | ---------------------------------------------------------------------------------------------------------------- |
| playerid | O ID do jogador para o qual mostrar a gangzone. |
| zone | O ID da gangzone a esconder para o jogador. Retornado por GangZoneCreate |
| color | A cor a ser mostrada na gangzone, pode ser integer ou hex no formato de cor RGBA. Transparência Alpha suportada. |
## Retorno
1 se a gangzone for mostrada, caso contrário 0 (não-existente).
## Exemplos
```c
new gGangZoneId;
public OnGameModeInit()
{
gGangZoneId = GangZoneCreate(1082.962, -2787.229, 2942.549, -1859.51);
return 1;
}
public OnPlayerSpawn(playerid)
{
GangZoneShowForPlayer(playerid, gGangZoneId, 0xFFFF0096);
return 1;
}
```
## Funções Relacionadas
- [GangZoneCreate](GangZoneCreate): Cria uma gangzone.
- [GangZoneDestroy](GangZoneDestroy): Destrói uma gangzone.
- [GangZoneShowForPlayer](GangZoneShowForPlayer): Mostra uma gangzzone a um jogador.
- [GangZoneHideForPlayer](GangZoneHideForPlayer): Esconde uma gangzone a um jogador.
- [GangZoneHideForAll](GangZoneHideForAll): Esconde uma gangzone para todos os jogadores.
- [GangZoneFlashForPlayer](GangZoneFlashForPlayer): Faz uma gangzone piscar para um jogador.
- [GangZoneFlashForAll](GangZoneFlashForAll): Faz uma gangzone piscar para todos os jogadores.
- [GangZoneStopFlashForPlayer](GangZoneStopFlashForPlayer): Pare uma Gangzone de piscar para um jogador.
- [GangZoneStopFlashForAll](GangZoneStopFlashForAll): Pare uma Gangzone de piscar para todos os jogadores.
| openmultiplayer/web/docs/translations/pt-BR/scripting/functions/GangZoneShowForPlayer.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/pt-BR/scripting/functions/GangZoneShowForPlayer.md",
"repo_id": "openmultiplayer",
"token_count": 822
} | 412 |
---
title: Kick
description: Expulsa um jogador do servidor. Ele terá que sair do jogo e re-conectar caso queira continuar jogando.
tags: ["administration"]
---
## Descrição
Expulsa um jogador do servidor. Ele terá que sair do jogo e re-conectar caso queira continuar jogando.
| Nome | Descrição |
| -------- | ------------------------------ |
| playerid | O ID do jogador a ser expulso. |
## Retorno
Esta função sempre retorna 1, mesmo que a função falhe a ser executada (Jogador específico não existe).
## Notas
:::warning
Qualquer ação realizada antes de Kick() (como enviar mensagem com SendClientMessage) não irá funcionar. Um temporizador deve ser usado para atrasar a expulsão.
:::
## Exemplos
```c
// Para exibir uma mensagem (por exemplo, motivo) para o jogador antes que a conexão seja fechada
// você tem que usar um cronômetro (timer) para criar um atraso. Esse atraso precisa ser de apenas alguns milissegundos,
// mas este exemplo usa um segundo inteiro apenas por garantia.
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext, "/kickme", true) == 0)
{
// Expulsa o jogador que executar este comando.
// Primeiro, envia a ele uma mensagem.
SendClientMessage(playerid, 0xFF0000FF, "Você foi expulso!");
// Bane-o um segundo depois da execução do comando por um cronômetro (timer).
SetTimerEx("DelayedKick", 1000, false, "i", playerid);
return 1;
}
return 0;
}
forward DelayedKick(playerid);
public DelayedKick(playerid)
{
Kick(playerid);
return 1;
}
```
## Funções Relacionadas
- [Ban](Ban.md): Bane um jogador do servidor.
- [BanEx](BanEx.md): Bane um jogador com uma razão específica.
| openmultiplayer/web/docs/translations/pt-BR/scripting/functions/Kick.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/pt-BR/scripting/functions/Kick.md",
"repo_id": "openmultiplayer",
"token_count": 694
} | 413 |
---
title: db_open
description: A função é usada para abrir uma conexão com um arquivo de banco de dados SQLite, que está dentro da pasta `../scriptfiles`.
keywords:
- sqlite
---
<LowercaseNote />
## Descrição
A função é usada para abrir uma conexão com um arquivo de banco de dados SQLite, que está dentro da pasta `../scriptfiles`.
| Nome | Descrição |
| ------ | ------------------------------------ |
| name[] | O nome do arquivo do banco de dados. |
## Retorno
Retorna o índice (começando em 1) da conexão com o banco de dados.
## Exemplos
```c
static DB:gDBConnectionHandle;
// ...
public OnGameModeInit()
{
// Criar uma conexão com um banco de dados
gDBConnectionHandle = db_open("exemplo.db");
// Se a conexão com o banco de dados existir
if(gDBConnectionHandle)
{
// Envia uma mensagem no console dizendo que uma conexão com o banco de dados foi criada com sucesso
print("Conexão com o banco de dados \"exemplo.db\" criada com sucesso.");
}
else
{
// Se não, retorna uma mensagem no console dizendo que falhou ao criar uma conexão com o banco de dados
print("Falha ao abrir uma conexão com o banco de dados \"exemplo.db\".");
}
return 1;
}
public OnGameModeExit()
{
// Feche a conexão com o banco de dados se a conexão estiver aberta
if(db_close(gDBConnectionHandle))
{
// Limpeza extra
gDBConnectionHandle = DB:0;
}
// ...
return 1;
}
```
## Notas
:::warning
Ele criará um novo arquivo de banco de dados SQLite, se não houver nenhum arquivo de banco de dados SQLite com o mesmo nome de arquivo disponível. Feche sua conexão com o banco de dados SQLite com [db_close](db_close)!
:::
## Funções relacionadas
- [db_close](db_close): Feche a conexão com um banco de dados SQLite.
- [db_query](db_query): Consulta um banco de dados SQLite.
- [db_free_result](db_free_result): Liberar memória de resultado de uma db_query.
- [db_num_rows](db_num_rows): Obtenha o número de linhas em um resultado.
- [db_next_row](db_next_row): Mover para a próxima linha.
- [db_num_fields](db_num_fields): Obtenha o número de campos em um resultado.
- [db_field_name](db_field_name): Retorna o nome de um campo em um determinado índice.
- [db_get_field](db_get_field): Obtém o conteúdo do campo com o ID especificado da linha de resultado atual.
- [db_get_field_assoc](db_get_field_assoc): Obtém o conteúdo do campo com o nome especificado da linha de resultado atual.
- [db_get_field_int](db_get_field_int): Obtém o conteúdo do campo como um número inteiro com ID especificado da linha de resultado atual.
- [db_get_field_assoc_int](db_get_field_assoc_int): Obtém o conteúdo do campo como um número inteiro com o nome especificado da linha de resultado atual.
- [db_get_field_float](db_get_field_float): Obtém o conteúdo do campo como um float com ID especificado da linha de resultado atual.
- [db_get_field_assoc_float](db_get_field_assoc_float): Obtém o conteúdo do campo como um float com o nome especificado da linha de resultado atual.
- [db_get_mem_handle](db_get_mem_handle): Obtenha o identificador de memória para um banco de dados SQLite que foi aberto com db_open.
- [db_get_result_mem_handle](db_get_result_mem_handle): Obtenha o identificador de memória para uma consulta SQLite que foi executada com db_query.
- [db_debug_openfiles](db_debug_openfiles): A função obtém o número de conexões de banco de dados abertas para fins de depuração.
- [db_debug_openresults](db_debug_openresults): A função obtém o número de resultados do banco de dados aberto.
| openmultiplayer/web/docs/translations/pt-BR/scripting/functions/db_open.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/pt-BR/scripting/functions/db_open.md",
"repo_id": "openmultiplayer",
"token_count": 1477
} | 414 |
---
title: Lista de Cores
description: Cores estão em toda parte no SA-MP - veículos, nomes de jogadores e blips, textdraws, gametext, chat, textos 3D e dialogs (as color embedding)! Abaixo você pode encontrar informações sobre essas coisas.
sidebar_label: Color List
---
## Texto do chat e cor do jogador
Cores no SA-MP são normalmente representados em código hexadecimal (embora integers possam ser usados também). Um texto de chat ou cor do jogador é semelhante a: 0xRRGGBBAA.
_RR_ é a parte vermelha da cor, _GG_ o verde e _BB_ o azul. _AA_ é o valor alpha. Se FF for usado aqui, a cor será exibida sem transparência e se 00 for usado, ficará invisível.
Para obter o código Hex para essas cores, vá para a página [Cores Hex](../resources/hex-colors.md).
### Valores Alpha (transparência)
As seguintes imagens mostram o efeito dos valores de transparência usados com um quadrado branco debaixo do jogador e à esquerda do ícone de save. Incrementos de 0x11 (17 decimal) são usados para demonstração, mas é claro que você pode usar qualquer valor.
The following images display the effect of transparency values used with a white quare under the player marker and left to the saving floppy icon. Increments of 0x11 (decimal 17) are used for demonstration, but of course you can use any value.
![Image:trans_matrix.png](/images/colorList/transparency/trans_matrix.png)
### Fazendo contas
Como as cores são apenas números, é possivel calcular com elas, embora nem sempre faça sentido. Por exemplo, é possivel ajustar a visibilidade do radar do jogador (veja acima) mantendo a mesma cor atual, independemente da cor que seja.
```c
SetPlayerMarkerVisibility(playerid, alpha = 0xFF)
{
new oldcolor, newcolor;
alpha = clamp(alpha, 0x00, 0xFF); // if an out-of-range value is supplied we'll fix it here first
oldcolor = GetPlayerColor(playerid); // get their color - Note: SetPlayerColor must have been used beforehand
newcolor = (oldcolor & ~0xFF) | alpha; // first we strip of all alpha data (& ~0xFF) and then we replace it with our desired value (| alpha)
return SetPlayerColor(playerid, newcolor); // returns 1 if it succeeded, 0 otherwise
}
```
### Convert string to value with pawn
Since the colors are just numbers you have to convert them sometimes from an input string "RRGGBBAA" to its number. This can be done using sscanf or the following function:
```c
stock HexToInt(string[])
{
if (!string[0])
{
return 0;
}
new
cur = 1,
res = 0;
for (new i = strlen(string); i > 0; i--)
{
res += cur * (string[i - 1] - ((string[i - 1] < 58) ? (48) : (55)));
cur = cur * 16;
}
return res;
}
```
Use HexToInt("RRGGBBAA") and you'll get a usable number as result for [SetPlayerColor](../functions/SetPlayerColor.md).
### Color embedding
It is possible to use colors within text in [client messages](../functions/SendClientMessage.md"), [dialogs](../functions/ShowPlayerDialog.md), [3D text labels](../functions/Create3DTextLabel.md), [object material texts](../functions/SetObjectMaterialText.md) and [vehicle numberplates](../functions/SetVehicleNumberPlate.md").
It is very similar to [gametext colors](../resources/gametextstyles.md), but allows any color to be used.
:::caution
This type of color embedding does not work in textdraws. See [GameTextStyle](../resources/gametextstyles.md).
:::
#### Example
```c
{FFFFFF}Hello this is {00FF00}green {FFFFFF}and this is {FF0000}red
```
Hello this is green and this is red
![Image:Example1.png](/images/colorList/Example1.png)
#### Another example
![Image:Cembed.png](/images/colorList/Cembed.png)
The code for the above chat line looks like this:
```c
SendClientMessage(playerid, COLOR_WHITE, "Welcome to {00FF00}M{FFFFFF}a{FF0000}r{FFFFFF}c{00FF00}o{FFFFFF}'{FF0000}s {FFFFFF}B{00FF00}i{FFFFFF}s{FF0000}t{FFFFFF}r{00FF00}o{FFFFFF}!");
```
You can define colors to use like so:
```c
#define COLOR_RED_EMBED "{FF0000}"
SendClientMessage(playerid, -1, "This is white and "COLOR_RED_EMBED"this is red.");
```
Or
```c
#define COLOR_RED_EMBED "FF0000"
SendClientMessage(playerid, -1, "This is white and {"COLOR_RED_EMBED"}this is red.");
```
The second example would be better as is it clearer that embedding is used.
#### Using GetPlayerColor
To use a player's color as an embedded color, you must first remove the alpha value. To do this, perform a logical right shift.
```c
new msg[128];
format(msg, sizeof(msg), "{ffffff}This is white and {%06x}this is the player's color!", GetPlayerColor(playerid) >>> 8);
SendClientMessage(playerid, 0xffffffff, msg);
```
The %x is the placeholder for hexadecimal values, the 6 ensures that the output string will always be six characters long and the 0 will pad it with zeros if it's not. Note that [GetPlayerColor](../resources/GetPlayerColor.md) only works properly if [SetPlayerColor](../resources/SetPlayerColor.md) has been used beforehand.
The colors used in color embedding are not like normal hex colors in Pawn. There is no '0x' prefix and no alpha value (last 2 digits).
### Color Pickers
- [SA-MP Colorpicker v1.1.0](http://www.gtavision.com/index.php?section=downloads&site=download&id=1974)
- [December.com](http://www.december.com/html/spec/color.html)
- [RGB Picker](http://psyclops.com/tools/rgb)
- [Adobe Kuler](https://kuler.adobe.com/create/color-wheel/)
- [Color Scheme Designer](http://colorschemedesigner.com/)
## GameText
For GameText colors you can use special tags to set the following text to a specific color.
```c
~r~ red
~g~ green
~b~ blue
~w~ white
~y~ yellow
~p~ purple
~l~ black
~h~ lighter color
```
Game text colour tags can be used to form different colours easily. The below colours are not exactly the same colour as above tags.
```c
~y~ yellow
~r~~h~ light red
~r~~h~~h~ red pink
~r~~h~~h~~h~ dark pink
~r~~h~~h~~h~~h~ light red pink
~r~~h~~h~~h~~h~~h~ pink
~g~~h~ light green
~g~~h~~h~ more light green
~g~~h~~h~~h~ sea green
~g~~h~~h~~h~~h~ offwhite
~b~~h~ blue
~b~~h~~h~ purplish blue
~b~~h~~h~~h~ light blue
~y~~h~~h~ offwhite
~p~~h~ medium pink
```
### Example
```c
~w~Hello this is ~b~blue ~w~and this is ~r~red
```
[![Image:Blueandred.png](/images/colorList/Blueandred.png)
Now these colors are pretty dark. You can make them brighter by using **~h~** after the color code:
```c
~w~Hello this is ~b~~h~blue ~w~and this is ~r~~h~red
```
[![Image:Blueandred2.png](/images/colorList/Blueandred2.png)
| openmultiplayer/web/docs/translations/pt-BR/scripting/resources/colorslist.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/pt-BR/scripting/resources/colorslist.md",
"repo_id": "openmultiplayer",
"token_count": 2444
} | 415 |
---
title: OnFilterScriptInit
description: Acest callback este apelat atunci când un filterscript este inițializat (încărcat).
tags: []
---
## Descriere
Acest callback este apelat atunci când un filterscript este inițializat (încărcat). Este apelat doar în interiorul filterscript-ului care începe.
## Exemple
```c
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("Filterscript-ul s-a incarcat !.");
print("--------------------------------------\n");
return 1;
}
```
## Related Functions
| openmultiplayer/web/docs/translations/ro/scripting/callbacks/OnFilterScriptInit.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/ro/scripting/callbacks/OnFilterScriptInit.md",
"repo_id": "openmultiplayer",
"token_count": 190
} | 416 |
---
title: OnPlayerEnterRaceCheckpoint
description: Acest callback este apelat atunci când un jucător intră într-un checkpoint al unei curse.
tags: ["player", "checkpoint", "racecheckpoint"]
---
## Descriere
Acest callback este apelat atunci când un jucător intră într-un checkpoint al unei curse.
| Name | Descriere |
| -------- | -------------------------------------------------------- |
| playerid | ID-ul jucătorului care a intrat în checkpoint-ul cursei. |
## Returnări
Este întotdeauna numit primul în filterscript-uri.
## Exemple
```c
public OnPlayerEnterRaceCheckpoint(playerid)
{
printf("Jucatorul %d a intrat intr-un checkpoint de cursa!", playerid);
return 1;
}
```
## Note
<TipNPCCallbacks />
## Funcții similare
- [SetPlayerCheckpoint](../functions/SetPlayerCheckpoint): Creați un checkpoint pentru un jucător.
- [DisablePlayerCheckpoint](../functions/DisablePlayerCheckpoint): Dezactivează checkpoint-ul curent al jucătorului.
- [IsPlayerInCheckpoint](../functions/IsPlayerInRaceCheckpoint): Verificați dacă un jucător se află într-un checkpoint.
- [SetPlayerRaceCheckpoint](../functions/SetPlayerRaceCheckpoint): Creați un checkpoint de cursei pentru un jucător.
- [DisablePlayerRaceCheckpoint](../functions/DisablePlayerRaceCheckpoint): Dezactivează checkpoint-ul cursei curente a jucătorului.
- [IsPlayerInRaceCheckpoint](../functions/IsPlayerInRaceCheckpoint): Verificați dacă un jucător se află într-un checkpoint al unei curse. | openmultiplayer/web/docs/translations/ro/scripting/callbacks/OnPlayerEnterRaceCheckpoint.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/ro/scripting/callbacks/OnPlayerEnterRaceCheckpoint.md",
"repo_id": "openmultiplayer",
"token_count": 570
} | 417 |
---
title: OnPlayerSelectObject
description: Acest callback este apelat atunci când un jucător selectează un obiect după ce SelectObject a fost folosit.
tags: ["player"]
---
## Descriere
Acest callback este apelat atunci când un jucător selectează un obiect după ce SelectObject a fost folosit.
| Nume | Descriere |
| -------- | ---------------------------------------------------------- |
| playerid | ID-ul jucătorului care a selectat un obiect |
| type | [Tipul](../resources/selectobjecttypes) de selecție |
| objectid | ID-ul obiectului selectat |
| modelid | Modelul obiectului selectat |
| Float:fX | Poziția X a obiectului selectat |
| Float:fY | Poziția Y a obiectului selectat |
| Float:fZ | Poziția Z a obiectului selectat |
## Returnări
1 - Will prevent other scripts from receiving this callback.
0 - Indicates that this callback will be passed to the next script.
It is always called first in filterscripts.
## Exemple
```c
public OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ)
{
printf("Jucătorul %d a selectat obiectul %d", playerid, objectid);
if (type == SELECT_OBJECT_GLOBAL_OBJECT)
{
EditObject(playerid, objectid);
}
else
{
EditPlayerObject(playerid, objectid);
}
SendClientMessage(playerid, 0xFFFFFFFF, "Acum puteți edita obiectul dvs.!");
return 1;
}
```
## Funcții similare
- [SelectObject](../functions/SelectObject): Selectați un obiect. | openmultiplayer/web/docs/translations/ro/scripting/callbacks/OnPlayerSelectObject.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/ro/scripting/callbacks/OnPlayerSelectObject.md",
"repo_id": "openmultiplayer",
"token_count": 777
} | 418 |
---
title: OnVehicleDeath
description: Acest callback este apelat atunci când un vehicul este distrus - fie prin explozie, fie prin scufundare în apă.
tags: ["vehicle"]
---
## Descriere
Acest callback este apelat atunci când un vehicul este distrus - fie prin explozie, fie prin scufundare în apă.
| Nume | Descriere |
| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| vehicleid | ID-ul vehiculului care a fost distrus. |
| killerid | ID-ul jucătorului care a raportat (sincronizat) distrugerea vehiculului (numele este înșelător). În general, șoferul sau un pasager (dacă există) sau cel mai apropiat jucător. |
## Returnări
It is always called first in filterscripts.
## Exemple
```c
public OnVehicleDeath(vehicleid, killerid)
{
new string[64];
format(string, sizeof(string), "Vehicle %i was destroyed. Reported by player %i.", vehicleid, killerid);
SendClientMessageToAll(0xFFFFFFFF, string);
return 1;
}
```
## Note
:::tip
Acest apel invers va fi apelat și atunci când un vehicul intră în apă, dar vehiculul poate fi salvat de la distrugere prin teleportare sau alungare (dacă este doar parțial scufundat). Reapelarea nu va fi apelată a doua oară, iar vehiculul poate dispărea când șoferul iese sau după o scurtă perioadă de timp.
:::
## Funcții similare
- [SetVehicleHealth](../functions/SetVehicleHealth): Setați starea de sănătate a unui vehicul. | openmultiplayer/web/docs/translations/ro/scripting/callbacks/OnVehicleDeath.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/ro/scripting/callbacks/OnVehicleDeath.md",
"repo_id": "openmultiplayer",
"token_count": 830
} | 419 |
---
title: AddStaticVehicleEx
description: Adaugă un vehicul 'static' (modelele sunt preîncărcate pentru jucători) la modul de joc.
tags: ["vehicle"]
---
## Descriere
Adaugă un vehicul 'static' (modelele sunt preîncărcate pentru jucători) la modul de joc. Diferă de la AddStaticVehicle într-un singur mod: permite setarea unui timp de respawn pentru când vehiculul este lăsat neocupat de șofer.
| Nume | Descriere |
| ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| modelid | ID-ul modelului vehiculului. |
| Float:spawn_X | Coordonata X pentru vehicul. |
| Float:spawn_Y | Coordonata Y pentru vehicul. |
| Float:spawn_Z | Coordonata Z pentru vehicul. |
| Float:z_angle | Unghiul de orientare pentru vehicul. |
| [color1](../resources/vehiclecolorid.md) | ID-ul culorii primare. |
| [color2](../resources/vehiclecolorid.md) | Codul secundar de culoare. |
| respawn_delay | Întârzierea până la respingerea mașinii fără șofer în câteva secunde. |
| addsiren | Adăugat în 0.3.7; nu va funcționa în versiunile anterioare. Are o valoare implicită 0. Permite vehiculului să aibă o sirenă, cu condiția ca vehiculul să aibă un claxon. |
## Se intoarce
Codul vehiculului vehiculului creat (1 - MAX_VEHICLES).
INVALID_VEHICLE_ID (65535) dacă vehiculul nu a fost creat (limita vehiculului a fost atinsă sau ID-ul modelului vehiculului nevalid a fost trecut).
## Exemple
```c
public OnGameModeInit()
{
// Add a Hydra (520) to the game that will respawn 15 seconds after being left
AddStaticVehicleEx (520, 2109.1763, 1503.0453, 32.2887, 82.2873, -1, -1, 15);
return 1;
}
```
## Funcții conexe
- [AddStaticVehicle](AddStaticVehicle.md): Adăugați un vehicul static.
- [CreateVehicle](CreateVehicle.md): Creați un vehicul.
| openmultiplayer/web/docs/translations/ro/scripting/functions/AddStaticVehicleEx.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/ro/scripting/functions/AddStaticVehicleEx.md",
"repo_id": "openmultiplayer",
"token_count": 2202
} | 420 |
---
title: Stiluri de tăiere a camerei
---
## Descriere
Stilurile de tăiere a camerei sunt folosite in [SetPlayerCameraLookAt](../functions/SetPlayerCameraLookAt), [InterpolateCameraPos](../functions/InterpolateCameraPos.md) si [InterpolateCameraLookAt](../functions/InterpolateCameraLookAt.md).
## Stiluri tăiate
```c
1 - CAMERA_MOVE
2 - CAMERA_CUT
```
| openmultiplayer/web/docs/translations/ro/scripting/resources/cameracutstyles.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/ro/scripting/resources/cameracutstyles.md",
"repo_id": "openmultiplayer",
"token_count": 137
} | 421 |
---
title: "Binar"
description: O privire aprofundată asupra operatorilor binari și bit-bit
---
## Credite
Acesta este dintr-un subiect Tutorial din SA-MP Forums. Autorul este **Kyosaur**.
## Ce este binarul?
Binarul este un sistem numeric care folosește două simboluri unice pentru a reprezenta numerele. În timp ce sistemul zecimal mai obișnuit folosește zece cifre (**baza 10**), binarul folosește doar 0 și 1. Acest lucru poate suna inutil în viața de zi cu zi, dar binarul este esențial atunci când vine vorba de computere. Calculatoarele la cel mai scăzut nivel își efectuează toate calculele prin manipularea fluxului de energie electrică pentru a indica stările de pornire și oprire. Exact asta este binarul, doar o tonă de comutatoare pornite și oprite. Acesta este un fel de concept extraterestru pentru majoritatea oamenilor, așa că să aruncăm o privire la sistemul zecimal și binar unul lângă celălalt.
Zecimal (baza 10)
```c
0
1
2
3
4
5
6
7
8
9
10
11
12
13
```
Binar (baza 2)
```c
0 //0
1 //1
10 //2
11 //3
100 //4
101 //5
110 //6
111 //7
1000 //8
1001 //9
1010 //10
1011 //11
1100 //12
1101 //13
```
Privind ambele sisteme unul lângă altul, veți observa că se comportă exact la fel. Odată ce ați ajuns la ultimul număr disponibil, trebuie să treceți la un alt loc. Aceste locuri în binar sunt denumite biți (**b** inary dig **its**) și sunt pur și simplu puteri a două; la fel cum locurile din sistemul zecimal sunt puteri de 10. Pentru a demonstra acest lucru, să aruncăm o privire la numărul 13 din notația standard.
** NOTĂ: ** '^' este putere în următoarele câteva exemple, nu este exclusiv bitologic (pe care îl vom acoperi mai târziu).
Zecimal (baza 10)
```c
13
//which equals
1 * (10^1) + 3 * (10^0)
//which equals
10+3
//which equals
13
```
Binar (baza 2)
```c
1101
//which equals
1 * (2^3) + 1 * (2^2) + 0 * (2^1) + 1 * (2^0)
//which equals
8+4+0+1
//which equals
13
```
Putem vedea din exemplul precedent că, dacă un bit este setat la 0, îl putem ignora și continua; la urma urmei, orice înmulțit cu 0 va fi 0. Exemplul anterior a fost puțin complicat și am încercat doar să fiu absolut clar. Când faceți conversia din binar, tot ce trebuie să vă faceți griji este să adăugați puterile tuturor biților care sunt aprinși.
Iată 12 puteri de 2 chiar lângă vârful capului meu:
```c
4096,2048,1024,512,256,128,64,32,16,8,4,2,1
```
Dacă nu știi nimic despre lucrul cu puteri, probabil că acest lucru nu are deloc sens pentru tine. O putere este un număr înmulțit cu el însuși x de câte ori. Având în vedere aceste informații, lista precedentă de puteri are probabil mai mult sens; Ei bine, cu excepția lui 1. S-ar putea să fiți curios de ce 2 ridicat la puterea lui 0 dă un rezultat de 1, tot ce pot spune la acest lucru este că doar o face.
```c
2^1 = 2, 2^3 = 4, 2^4 = 8
```
Putem vedea că atunci când ne deplasăm spre dreapta, valoarea noastră anterioară este înmulțită cu 2; deci este sigur să presupunem că atunci când ne deplasăm spre stânga noua noastră valoare este doar numărul anterior împărțit la 2. Având în vedere acest lucru, puteți vedea cum putem ajunge cu 2 la puterea zero egal cu 1. Dacă nu este satisfăcător suficient, sunt sigur că puteți găsi mai multe dovezi pe **\*\***. Toate acestea fiind spuse, să aruncăm o privire la un ultim exemplu și să îl facem oarecum complicat!
```c
111011001011111000 //242424
//Remember, ignore the bits that arent turned on.
1 * (2^17) = 131072
1 * (2^16) = 65536
1 * (2^15) = 32768
1 * (2^13) = 8192
1 * (2^12) = 4096
1 * (2^9) = 512
1 * (2^7) = 128
1 * (2^6) = 64
1 * (2^5) = 32
1 * (2^4) = 16
1 * (2^3) = 8
131072+65536+32768+8192+4096+512+128+64+32+16+8
=
242424
```
Amintiți-vă când faceți conversia: prima putere este 0, așa că nu faceți greșeala văzând locul 18 ca 2 ^ 18. Există într-adevăr 18 puteri, dar asta include puterea lui 0, deci 17 este de fapt puterea noastră cea mai mare.
### O privire mai profundă asupra biților
Majoritatea limbajelor de programare permit diferite tipuri de date care variază în cantitatea de biți care pot fi utilizați pentru a stoca informații; totuși pionul este un limbaj de 32 de biți fără tip. Aceasta înseamnă că pionul va avea întotdeauna 32 de biți disponibili pentru stocarea informațiilor. Ce se întâmplă atunci când aveți multe informații? Răspunsul la această întrebare constă în numere întregi semnate și nesemnate.
#### Numere întregi semnate
Ați observat vreodată că atunci când un număr întreg din pion ajunge la mare se transformă într-un negativ? Această „împachetare” se datorează depășirii valorii maxime în pion, care este:
```c
2^31 - 1 //Power, not bitwise exclusive. Also the -1 is because we count 0 (there ARE 2,147,483,648 values, but that is with 0, So technically 2,147,483,647 is the max).
//which equals
2,147,483,647
//which in binary is
1111111111111111111111111111111 //31 bits- all on
```
S-ar putea să vă întrebați de ce ACEASTA este valoarea maximă și nu 2 ^ 32-1 (4.294.967.295). Aici intră în joc întregi semnate și nesemnate. Numerele întregi semnate au capacitatea de a stoca valori negative, unde numerele întregi nesemnate nu. S-ar putea să pară că mă abăt de la întrebare, dar vă asigur că nu sunt. Motivul pentru care numărul întreg maxim nu este 2 ^ 32-1 se datorează faptului că bitul 32 este folosit ca un fel de comutare pentru valori negative și pozitive. Aceasta se numește MSB (bitul cel mai semnificativ) dacă MSB este pornit, numărul va fi negativ; dacă este dezactivat, numărul este pozitiv. Destul de simplu, nu?
Înainte de a arăta câteva valori negative, trebuie să explic cum sunt reprezentate valorile negative în pion. Pawn folosește un sistem numit complement 2 pentru a reprezenta valori negative, ceea ce înseamnă practic că răsuciți fiecare bit din numărul dvs. și adăugați 1 la noul număr pentru a-l face negativ.
Să aruncăm o privire asupra câtorva valori negative în timp ce această idee este încă în cap:
```c
11111111111111111111111111111111 //all 32 bits turned on
//equals
-1
//and
11111111111111111111111111111110
//equals
-2
//and finally
10000000000000000000000000000000
//equals
-2147483648
```
Vezi, toate numerele negative sunt pur și simplu numărul pozitiv inițial, cu toți biții săi răsturnați și crescuți cu unul. Acest lucru este foarte clar cu ultimul nostru exemplu, deoarece cel mai înalt număr POZITIV este 2147483647.
Din aceasta putem vedea că intervalul numeric din pawn este de fapt:
```c
−2^31 to +2^31 − 1
```
#### Numere întregi nesemnate
Nu există astfel de numere întregi nesemnate în pawn, dar adăug acest lucru doar pentru a fi echilibrat. Singura diferență între un număr întreg semnat și un întreg nesemnat este că numerele întregi nesemnate nu pot stoca valori negative; Numerele întregi se încheie, dar se întorc la 0, în loc de o valoare negativă.
## Operatori binari
Operatorii binari vă permit să manipulați biți individuali dintr-un model de biți. Să aruncăm o privire la o listă de operatori biți disponibili.
- Deplasare aritmetică în biți: >> și <<
- Deplasare logică în biți: >>>
- Bitwise NOT (aka complement): ~
- Bitwise ȘI: &
- OR bit: |
- Bitwise XOR (aka exclusive-or): ^
### Bitwise AND
** NOTĂ:** Nu trebuie confundat de operatorul logic AND '&&'
Un AND binar ia pur și simplu AND-ul logic al biților din fiecare poziție a unui număr sub formă binară. Sună puțin confuz, așa că să aruncăm o privire în acțiune!
```c
1100 //12
&
0100 //4
=
0100 //4 as they both have "100" in them (which is 4)
```
A fost puțin ușor, să aruncăm o privire mai grea:
```c
10111000 //184
&
01001000 //72
=
00001000 //8
```
Privirea exemplelor ar trebui să vă ofere o idee destul de bună despre ceea ce face acest operator. Compară două seturi de biți împreună, dacă ambele partajează un bit de 1, rezultatul va avea același bit activat. Dacă nu împart deloc biți, atunci rezultatul este 0.
### Bitwise OR
** NOTĂ:** Nu trebuie confundat de operatorul SAU logic '||'
Bitwise OR funcționează aproape exact la fel ca bitwise AND. Singura diferență dintre cele două este că SAU în biți are nevoie doar de unul dintre cele două modele de biți pentru a avea un bit activat pentru ca rezultatul să aibă același bit activat. Să aruncăm o privire la câteva exemple!
```c
1100 //12
|
0100 //4
=
1100 //12.
```
Să aruncăm o privire la încă un exemplu.
```c
10111000 //184
|
01001000 //72
=
11111000 //248
```
Cred că acest lucru se explică destul de mult, dacă oricare dintre numere au pornit puțin, rezultatul va avea și acel bit activat.
### Bitwise XOR
Acest operator este puțin asemănător cu operatorul OR în biți, dar există o diferență. Să ne uităm la același exemplu folosit în secțiunea OR bitwise și să vedem dacă puteți observa diferența.
```c
1100 //12
^
0100 //4
=
1000 //8.
```
și, în sfârșit:
```c
10111000 //184
^
01001000 //72
=
11110000 //240
```
### Bitwise NU
Acest operator întoarce fiecare bit în modelul de biți, transformând toate 1 în 0 și vice versa.
```c
~0
=
11111111111111111111111111111111 //-1
//and
~100 //4
=
11111111111111111111111111111011 //-5
//and
~1111111111111111111111111111111 //2147483647 (not to be confused with -1, which has 32 bits, not 31)
=
10000000000000000000000000000000 //-2147483648 (32nd bit turned on)
```
Dacă nu înțelegeți de ce valorile negative sunt un fel de „înapoi”, vă rugăm să citiți secțiunea despre numerele întregi semnate.
### Bit Shifting
Bit shifting face exact ceea ce ți-ai imagina că face; deplasează biții într-un număr către o anumită direcție. Dacă vă amintiți mai devreme în articol am menționat că PAWN are un anumit interval de memorie (32 de biți care pot fi utilizați pentru stocare). Ce se întâmplă când treceți un număr peste acel interval? Răspunsul la această întrebare constă în ce operator de schimbare folosiți și în ce direcție vă deplasați.
** NOTĂ:** În exemplele următoare, toate numerele binare vor fi scrise integral (toți cei 32 de biți) pentru a evita orice confuzii.
#### Schimbări aritmetice
#### Schimbare dreapta
Toți biții dintr-un număr sunt deplasați de câte ori spre dreapta atunci când se utilizează acest operator. Să aruncăm o privire rapidă la un exemplu simplu.
```c
00000000000000000000000000001000 //8
>>
2
=
00000000000000000000000000000010 //2
```
Puteți vedea din exemplul precedent că fiecare bit s-a deplasat la dreapta cu două locuri, iar două zerouri au fost adăugate pe partea stângă ca umplutură. Aceste două zerouri sunt de fapt valoarea MSB (Cel mai semnificativ bit) și sunt foarte importante atunci când vine vorba de deplasarea cu semn întreg. Motivul pentru care MSB este folosit ca umplutură este că păstrăm semnul numărului care este mutat. Să aruncăm o privire la același exemplu, cu excepția să îl facem negativ.
```c
11111111111111111111111111111000 //-8
>>
2
=
11111111111111111111111111111110 //-2
```
În mod clar, acest lucru se comportă exact la fel ca în exemplul anterior, cu excepția biților din stânga folosiți pentru umplere; ceea ce dovedește că umplerea deplasării aritmetice drepte este valoarea MSB.
#### Schimbare stânga
Acesta este exact opusul operatorului de schimbare aritmetică dreapta. Deplasează toți biții dintr-un număr la stânga x de câte ori. Să vedem un exemplu.
```c
00000000000000000000000000001000 //8
<<
2
=
00000000000000000000000000100000 //32
```
Singura diferență dintre deplasarea aritmetică stângă și dreaptă (în afară de direcția deplasării) ar fi modul în care gestionează umplutura. Cu schimbarea aritmetică dreaptă, umplerea este valoarea MSB (Cel mai semnificativ bit), dar cu schimbarea aritmetică stângă valoarea este doar 0. Acest lucru se datorează faptului că nu există informații relevante, cum ar fi semnul unui număr de care să țineți evidența.
```c
11111111111111111111111111111000 //-8
<<
2
=
11111111111111111111111111100000 //-32
```
Vedea? Chiar dacă umplerea este întotdeauna 0, semnul numărului este păstrat în continuare. Singurul lucru de care trebuie să îți faci griji este trecerea la departe. Dacă deplasați un număr pozitiv peste cel mai mare număr posibil, acesta va deveni negativ și va fi invers cu valori negative (în cele din urmă veți atinge 0).
#### Schimbări logice
##### Schimbare dreapta
Aceasta este inversa schimbării aritmetice la stânga. Cel mai bun mod de a-l descrie ar fi un hibrid între cele două schimbări aritmetice. Să aruncăm o privire în acțiune!
```c
00000000000000000000000000001000 //8
>>>
2
=
00000000000000000000000000000010 //2
```
Biții din numărul 8 s-au deplasat de 2 ori spre dreapta. Deci, în ce fel este diferit acest lucru de schimbarea aritmetică dreaptă? Răspunsul este căptușeala. Cu deplasarea aritmetică la dreapta, umplerea este valoarea MSB, dar cu deplasarea logică la dreapta, umplerea este doar 0 (la fel cum este cu deplasarea aritmetică la stânga). Aceasta înseamnă că nu va păstra numărul semnului, iar rezultatul nostru va fi întotdeauna pozitiv. Pentru a demonstra acest lucru, să schimbăm un număr negativ!
```c
11111111111111111111111111111000 //-8
>>>
2
=
00111111111111111111111111111110 //1073741822
```
Asta dovedește că nu vom obține valori negative în timp ce folosim schimbarea logică dreaptă!
##### Schimbare stânga
Nu există o deplasare logică la stânga, deoarece ar face exact același lucru cu deplasarea stângă aritmetică. Tocmai am adăugat acest lucru pentru a evita confuzii de orice fel și, de asemenea, pentru a menține secțiunea echilibrată.
| openmultiplayer/web/docs/translations/ro/tutorials/Binary.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/ro/tutorials/Binary.md",
"repo_id": "openmultiplayer",
"token_count": 6175
} | 422 |
---
title: OnActorStreamOut
description: Этот коллбэк вызывается, когда актёр пропадает из зоны стрима клиента.
tags: []
---
<VersionWarn name='callback' version='SA-MP 0.3.7' />
## Описание
Этот коллбэк вызывается, когда актёр пропадает из зоны стрима клиента.
| Аргумент | Описание |
| ----------- | ------------------------------------------------- |
| actorid | ID актёра, который пропал из зоны стрима клиента. |
| forplayerid | Клиент, в из зоны стрима которого пропал актёр. |
## Результат
Данный коллбэк всегда вызывается в filterscript'ах первее.
## Пример
```c
public OnActorStreamOut(actorid, forplayerid)
{
new string[40];
format(string, sizeof(string), "Актёр %d пропал из вашей зоны стрима.", actorid);
SendClientMessage(forplayerid, 0xFFFFFFFF, string);
return 1;
}
```
## Примечания
<TipNPCCallbacks />
## Функции
| openmultiplayer/web/docs/translations/ru/scripting/callbacks/OnActorStreamOut.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/ru/scripting/callbacks/OnActorStreamOut.md",
"repo_id": "openmultiplayer",
"token_count": 639
} | 423 |
---
title: "Удалённая консоль (RCON)"
descripion: Удалённое администрирование сервера.
---
Удаленная консоль - это командная строка, в которой вы можете использовать команды RCON без необходимости находиться в игре и на вашем сервере. Начиная с версии 0.3b, удаленная консоль была удалена из браузера сервера. В дальнейшем вам будет необходимо использовать другой способ работы с удалённой консолью.
1. Откройте текстовый редактор.
2. Напишите следующий текст: `rcon.exe IP ПОРТ RCON-ПАРОЛЬ` (Замените IP/ПОРТ/RCON-ПАРОЛЬ на значения необходимого для подключения сервера)
3. Сохраните файл, как `rcon.bat`
4. Поместите его в папку с GTA San Andreas, где расположен файл `rcon.exe`.
5. Запустите `rcon.bat`
6. Вводите команды, которые нужны.
![Удалённая консоль](/images/server/rcon.jpg)
Замечание: Нет необходимости в написании `/rcon` перед каждой командой, используя консоль сервера или удалённую консоль, пишите просто `gmx`, к примеру.
| openmultiplayer/web/docs/translations/ru/server/RemoteConsole.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/ru/server/RemoteConsole.md",
"repo_id": "openmultiplayer",
"token_count": 931
} | 424 |
---
title: OnObjectMoved
description: Ta "callback" se pokliče, ko se objekt premakne po MoveObject (ko se neha premikati).
tags: []
---
## Opis
Ta "callback" se pokliče, ko se objekt premakne po MoveObject (ko se neha premikati).
| Ime | Opis |
| -------- | -------------------------------- |
| objectid | ID predmet, ki je bil premaknjen |
## Returns
V filtrih je vedno poklican prvi.
## Primeri
```c
public OnObjectMoved(objectid)
{
printf("Predmet %d je zaključil svoje gibanje.", objectid);
return 1;
}
```
## Opombe
:::tip
SetObjectPos ne deluje, ko ga uporabljate v tem "callback". Če želite to popraviti, znova ustvarite predmet.
:::
## Povezane Funkcijo
- [MoveObject](../functions/MoveObject.md): Premakni predmet.
- [MovePlayerObject](../functions/MovePlayerObject.md): Premaknite predmet predvajalnika.
- [IsObjectMoving](../functions/IsObjectMoving.md): Prepričajte se, da se predmet premika.
- [StopObject](../functions/StopObject.md): Zaustavite premikanje predmeta.
- [OnPlayerObjectMoved](OnPlayerObjectMoved.md): Pokliče se, ko se predvajalnik neha premikati.
| openmultiplayer/web/docs/translations/sl/scripting/callbacks/OnObjectMoved.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/sl/scripting/callbacks/OnObjectMoved.md",
"repo_id": "openmultiplayer",
"token_count": 448
} | 425 |
---
title: CreatePlayer3DTextLabel
description: Kreira 3D Text Label samo za posebnog igraca.
tags: ["player", "3dtextlabel"]
---
## Opis
Kreira 3D Text Label samo za posebnog igraca.
| Ime | Opis |
| --------------- | ---------------------------------------------------------------------- |
| playerid | Igrac koji treba da vidi novokreirani 3D label. |
| text[] | Tekst koji ce se prikazati |
| color | Boja teksta |
| x | X koordinata |
| y | Y koordinata |
| z | Z koordinata |
| DrawDistance | Distance sa koje igrac moze videti label |
| attachedplayer | Igrac za koga zelimo zakaciti 3D label. (Nijedan: INVALID_PLAYER_ID) |
| attachedvehicle | Vozilo za koga zelimo zakaciti 3D label. (Nijedno: INVALID_VEHICLE_ID) |
| testLOS | 0/1 Opcija da se tekst labela ne moze videti kroz zidove |
## Vracanje
ID od novokreiranog 3D labela, ili INVALID_3DTEXT_ID ako smo presli ogranicenje 3D Player Text Labela (MAX_3DTEXT_PLAYER).
## Primeri
```c
if (strcmp(cmd, "/playerlabel", true) == 0)
{
new
PlayerText3D: playerTextId,
Float: X, Float: Y, Float: Z;
GetPlayerPos(playerid, X, Y, Z);
playerTextId = CreatePlayer3DTextLabel(playerid, "Zdravo\nJa sam na tvojoj poziciji!", 0x008080FF, X, Y, Z, 40.0);
return 1;
}
```
## Beleske
:::tip
DrawDistance izgleda kao da je manji u spectate modu.
:::
:::warning
Ako je text[] prazan, igraci blizu labela mogu da crash-aju.
:::
## Related Functions
- [Create3DTextLabel](Create3DTextLabel.md): Kreira 3D Text Label.
- [Delete3DTextLabel](Delete3DTextLabel.md): Brise 3D text label.
- [Attach3DTextLabelToPlayer](Attach3DTextLabelToPlayer.md): Zakaci 3D text label za igraca.
- [Attach3DTextLabelToVehicle](Attach3DTextLabelToVehicle.md): Zakaci 3D text label za vozilo.
- [Update3DTextLabelText](Update3DTextLabelText.md): Promeni tekst 3D text labela.
- [DeletePlayer3DTextLabel](DeletePlayer3DTextLabel.md): Prise Player 3D text label.
- [UpdatePlayer3DTextLabelText](UpdatePlayer3DTextLabelText.md): Promeni tekst Player 3D text labela.
| openmultiplayer/web/docs/translations/sr/scripting/functions/CreatePlayer3DTextLabel.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/sr/scripting/functions/CreatePlayer3DTextLabel.md",
"repo_id": "openmultiplayer",
"token_count": 1304
} | 426 |
---
title: OnGameModeExit
description: Callback นี้ถูกเรียกเมื่อเกมโหมดสิ้นสุดการทำงานไม่ว่าจะผ่าน 'gmx', เซิร์ฟเวอร์กำลังปิดตัวลง, หรือ GameModeExit
tags: []
---
## คำอธิบาย
Callback นี้ถูกเรียกเมื่อเกมโหมดสิ้นสุดการทำงานไม่ว่าจะผ่าน 'gmx', เซิร์ฟเวอร์กำลังปิดตัวลง, หรือ GameModeExit
| ชื่อ | คำอธิบาย |
| ---- | -------- |
## ตัวอย่าง
```c
public OnGameModeExit()
{
print("เกมโหมดได้หยุดการทำงานแล้ว");
return 1;
}
```
## บันทึก
:::tip
ฟังก์ชั่นนี้ยังสามารถถูกใช้ในฟิลเตอร์สคริปต์ได้เพื่อตรวจสอบว่าเกมโหมดมีการเปลี่ยนแปลงด้วยคำสั่ง RCON ไหม เช่น changemode, gmx หรือมีการเปลี่ยนเกมโหมดแล้วแต่ฟิลเตอร์สคริปต์ยังไม่ถูกรีโหลด เมื่อใช้ OnGameModeExit ร่วมกับคำสั่ง 'rcon gmx' ในคอนโซล มีความเป็นไปได้ที่จะเกิดข้อผิดพลาดขึ้นกับไคลเอนต์ยกตัวอย่างเช่น การเรียก RemoveBuildingForPlayer มากเกินไปในระหว่างที่ OnGameModeInit กำลังทำงานอยู่ซึ่งอาจส่งผลให้ไคลเอนต์หยุดทำงาน Callback นี้จะไม่ถูกเรียกถ้าหากเซิร์ฟเวอร์ขัดข้องหรือโปรเซสถูกปิดโดยวิธีอื่นอย่างเช่นการใช้คำสั่ง Linux ในการหยุดการทำงาน หรือกดปุ่มปิดบนคอนโซลใน Windows
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- [GameModeExit](../../scripting/functions/GameModeExit.md): ออกจากเกมโหมดปัจจุบัน
| openmultiplayer/web/docs/translations/th/scripting/callbacks/OnGameModeExit.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/callbacks/OnGameModeExit.md",
"repo_id": "openmultiplayer",
"token_count": 1622
} | 427 |
---
title: OnPlayerEnterVehicle
description: This callback is called when a player starts to enter a vehicle, meaning the player is not in vehicle yet at the time this callback is called.
tags: ["player", "vehicle"]
---
## คำอธิบาย
This callback is called when a player starts to enter a vehicle, meaning the player is not in vehicle yet at the time this callback is called.
| Name | Description |
| ----------- | ---------------------------------------------------- |
| playerid | ID of the player who attempts to enter a vehicle. |
| vehicleid | ID of the vehicle the player is attempting to enter. |
| ispassenger | 0 if entering as driver. 1 if entering as passenger. |
## ส่งคืน
มันถูกเรียกในฟิลเตอร์สคริปต์ก่อนเสมอ
## ตัวอย่าง
```c
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new string[128];
format(string, sizeof(string), "You are entering vehicle %i", vehicleid);
SendClientMessage(playerid, 0xFFFFFFFF, string);
return 1;
}
```
## บันทึก
:::tip
This callback is called when a player BEGINS to enter a vehicle, not when they HAVE entered it. See OnPlayerStateChange. This callback is still called if the player is denied entry to the vehicle (e.g. it is locked or full).
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- [PutPlayerInVehicle](../../scripting/functions/PutPlayerInVehicle.md): Put a player in a vehicle.
- [GetPlayerVehicleSeat](../../scripting/functions/GetPlayerVehicleSeat.md): Check what seat a player is in.
| openmultiplayer/web/docs/translations/th/scripting/callbacks/OnPlayerEnterVehicle.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/callbacks/OnPlayerEnterVehicle.md",
"repo_id": "openmultiplayer",
"token_count": 628
} | 428 |
---
title: OnPlayerSelectedMenuRow
description: This callback is called when a player selects an item from a menu (ShowMenuForPlayer).
tags: ["player", "menu"]
---
## คำอธิบาย
This callback is called when a player selects an item from a menu (ShowMenuForPlayer).
| Name | Description |
| -------- | ----------------------------------------------------------- |
| playerid | The ID of the player that selected a menu item. |
| row | The ID of the row that was selected. The first row is ID 0. |
## ส่งคืน
มันถูกเรียกในเกมโหมดก่อนเสมอ
## ตัวอย่าง
```c
new Menu:MyMenu;
public OnGameModeInit()
{
MyMenu = CreateMenu("Example Menu", 1, 50.0, 180.0, 200.0, 200.0);
AddMenuItem(MyMenu, 0, "Item 1");
AddMenuItem(MyMenu, 0, "Item 2");
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
if (GetPlayerMenu(playerid) == MyMenu)
{
switch(row)
{
case 0: print("Item 1 Selected");
case 1: print("Item 2 Selected");
}
}
return 1;
}
```
## บันทึก
:::tip
The menu ID is not passed to this callback. GetPlayerMenu must be used to determine which menu the player selected an item on.
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- [CreateMenu](../../scripting/functions/CreateMenu.md): Create a menu.
- [DestroyMenu](../../scripting/functions/DestroyMenu.md): Destroy a menu.
- [AddMenuItem](../../scripting/functions/AddMenuItem.md): Adds an item to a specified menu.
- [ShowMenuForPlayer](../../scripting/functions/ShowMenuForPlayer.md): Show a menu for a player.
- [HideMenuForPlayer](../../scripting/functions/HideMenuForPlayer.md): Hide a menu for a player.
| openmultiplayer/web/docs/translations/th/scripting/callbacks/OnPlayerSelectedMenuRow.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/callbacks/OnPlayerSelectedMenuRow.md",
"repo_id": "openmultiplayer",
"token_count": 769
} | 429 |
---
title: OnVehicleMod
description: This callback is called when a vehicle is modded.
tags: ["vehicle"]
---
## คำอธิบาย
This callback is called when a vehicle is modded.
| Name | Description |
| ----------- | ------------------------------------------------------- |
| playerid | The ID of the driver of the vehicle. |
| vehicleid | The ID of the vehicle which is modded. |
| componentid | The ID of the component which was added to the vehicle. |
## ส่งคืน
It is always called first in gamemode so returning 0 there also blocks other filterscripts from seeing it.
## ตัวอย่าง
```c
public OnVehicleMod(playerid, vehicleid, componentid)
{
printf("Vehicle %d was modded by ID %d with the componentid %d",vehicleid, playerid,componentid);
if (GetPlayerInterior(playerid) == 0)
{
BanEx(playerid, "Tuning Hacks"); // Anti-tuning hacks script
return 0; // Prevents the bad modification from being synced to other players
//(Tested and it works even on servers wich allow you to mod your vehicle using commands, menus, dialogs, etc..
}
return 1;
}
```
## บันทึก
:::tip
This callback is NOT called by AddVehicleComponent.
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- [AddVehicleComponent](../../scripting/functions/AddVehicleComponent.md): Add a component to a vehicle.
- [OnEnterExitModShop](../../scripting/callbacks/OnEnterExitModShop.md): Called when a vehicle enters or exits a mod shop.
- [OnVehiclePaintjob](../../scripting/callbacks/OnVehiclePaintjob.md): Called when a vehicle's paintjob is changed.
- [OnVehicleRespray](../../scripting/callbacks/OnVehicleRespray.md): Called when a vehicle is resprayed.
| openmultiplayer/web/docs/translations/th/scripting/callbacks/OnVehicleMod.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/callbacks/OnVehicleMod.md",
"repo_id": "openmultiplayer",
"token_count": 698
} | 430 |
---
title: AddVehicleComponent
description: Adds a 'component' (often referred to as a 'mod' (modification)) to a vehicle.
tags: ["vehicle"]
---
## คำอธิบาย
Adds a 'component' (often referred to as a 'mod' (modification)) to a vehicle. Valid components can be found here.
| Name | Description |
| --------- | ------------------------------------------------------------------------------- |
| vehicleid | The ID of the vehicle to add the component to. Not to be confused with modelid. |
| |[componentid](../../scripting/resources/carcomponentid.md) | The ID of the component to add to the vehicle.|
## ส่งคืน
0 - The component was not added because the vehicle does not exist.
1 - The component was successfully added to the vehicle.
## ตัวอย่าง
```c
new gTAXI;
public OnGameModeInit()
{
gTAXI = AddStaticVehicle(420, -2482.4937, 2242.3936, 4.6225, 179.3656, 6, 1); // Taxi
return 1;
}
public OnPlayerStateChange(playerid, PLAYER_STATE:newstate, PLAYER_STATE:oldstate)
{
if (newstate == PLAYER_STATE_DRIVER && oldstate == PLAYER_STATE_ONFOOT)
{
if (GetPlayerVehicleID(playerid) == gTAXI)
{
AddVehicleComponent(gTAXI, 1010); // Nitro
SendClientMessage(playerid, 0xFFFFFFAA, "Nitro added to the Taxi.");
}
}
return 1;
}
```
## บันทึก
:::warning
Using an invalid component ID crashes the player's game. There are no internal checks for this.
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- [RemoveVehicleComponent](../../scripting/functions/RemoveVehicleComponent.md): Remove a component from a vehicle.
- [GetVehicleComponentInSlot](../../scripting/functions/GetVehicleComponentInSlot.md): Check what components a vehicle has.
- [GetVehicleComponentType](../../scripting/functions/GetVehicleComponentType.md): Check the type of component via the ID.
- [OnVehicleMod](../../scripting/callbacks/OnVehicleMod.md): Called when a vehicle is modded.
- [OnEnterExitModShop](../../scripting/callbacks/OnEnterExitModShop.md): Called when a vehicle enters or exits a mod shop.
| openmultiplayer/web/docs/translations/th/scripting/functions/AddVehicleComponent.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/AddVehicleComponent.md",
"repo_id": "openmultiplayer",
"token_count": 832
} | 431 |
---
title: Ban
description: Ban a player who is currently in the server.
tags: ["administration"]
---
## คำอธิบาย
Ban a player who is currently in the server. They will be unable to join the server ever again. The ban will be IP-based, and be saved in the samp.ban file in the server's root directory. BanEx can be used to give a reason for the ban. IP bans can be added/removed using the RCON banip and unbanip commands (SendRconCommand).
| Name | Description |
| -------- | ---------------------------- |
| playerid | The ID of the player to ban. |
## ส่งคืน
This function does not return any specific values.
## ตัวอย่าง
```c
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext, "/banme", true) == 0)
{
// Ban the player that types this command.
Ban(playerid);
return 1;
}
}
// In order to display a message (eg. reason) for the player before the connection is closed
// you have to use a timer to create a delay. This delay needs only to be a few milliseconds long,
// but this example uses a full second just to be on the safe side.
forward DelayedBan(playerid);
public DelayedBan(playerid)
{
Ban(playerid);
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext, "/banme", true) == 0)
{
// Bans the player who executed this command.
// First, send them a message.
SendClientMessage(playerid, 0xFF0000FF, "You have been banned!");
// Actually ban them a second later on a timer.
SetTimerEx("DelayedBan", 1000, false, "d", playerid);
return 1;
}
return 0;
}
```
## บันทึก
:::warning
Any action taken directly before Ban() (such as sending a message with SendClientMessage) will not reach the player. A timer must be used to delay the ban.
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- [BanEx](../functions/BanEx): Ban a player with a custom reason.
- [Kick](../functions/Kick): Kick a player from the server.
| openmultiplayer/web/docs/translations/th/scripting/functions/Ban.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/Ban.md",
"repo_id": "openmultiplayer",
"token_count": 751
} | 432 |
---
title: CreateMenu
description: Creates a menu.
tags: ["menu"]
---
## คำอธิบาย
Creates a menu.
| Name | Description |
| --------------- | ----------------------------------------------------------------------------------- |
| title[] | The title for the new menu. |
| columns | How many colums shall the new menu have. |
| Float:x | The X position of the menu (640x460 canvas - 0 would put the menu at the far left). |
| Float:y | The Y position of the menu (640x460 canvas - 0 would put the menu at the far top). |
| Float:col1width | The width for the first column. |
| Float:col2width | The width for the second column. |
## ส่งคืน
The ID of the new menu or -1 on failure.
## ตัวอย่าง
```c
new Menu:examplemenu;
public OnGameModeInit()
{
examplemenu = CreateMenu("Your Menu", 2, 200.0, 100.0, 150.0, 150.0);
return 1;
}
```
## บันทึก
:::tip
This function merely CREATES the menu - ShowMenuForPlayer must be used to show it. You can only create and access 2 columns (0 & 1). If the title's length is equal to or greater than 32 chars the title is truncated to 30 characters.
:::
:::warning
There is a limit of 12 items per menu, and a limit of 128 menus in total.
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- [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.
- [DestroyMenu](../../scripting/functions/DestroyMenu.md): Destroy a menu.
- [ShowMenuForPlayer](../../scripting/functions/ShowMenuForPlayer.md): Show a menu for a player.
- [HideMenuForPlayer](../../scripting/functions/HideMenuForPlayer.md): Hide a menu for a player.
- [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/CreateMenu.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/CreateMenu.md",
"repo_id": "openmultiplayer",
"token_count": 1001
} | 433 |
---
title: DestroyVehicle
description: Destroy a vehicle.
tags: ["vehicle"]
---
## คำอธิบาย
Destroy a vehicle. It will disappear instantly.
| Name | Description |
| --------- | --------------------------------- |
| vehicleid | The ID of the vehicle to destroy. |
## ส่งคืน
1: The function executed successfully.
0: The function failed to execute. The vehicle does not exist.
## ตัวอย่าง
```c
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext, "/destroyveh", true) == 0)
{
new vehicleid = GetPlayerVehicleID(playerid);
DestroyVehicle(vehicleid);
return 1;
}
return 0;
}
```
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- [CreateVehicle](../../scripting/functions/CreateVehicle.md): Create a vehicle.
- [RemovePlayerFromVehicle](../../scripting/functions/RemovePlayerFromVehicle.md): Throw a player out of their vehicle.
- [SetVehicleToRespawn](../../scripting/functions/SetVehicleToRespawn.md): Respawn a vehicle.
| openmultiplayer/web/docs/translations/th/scripting/functions/DestroyVehicle.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/DestroyVehicle.md",
"repo_id": "openmultiplayer",
"token_count": 438
} | 434 |
---
title: EnableVehicleFriendlyFire
description: Enable friendly fire for team vehicles.
tags: ["vehicle"]
---
## คำอธิบาย
Enable friendly fire for team vehicles. Players will be unable to damage teammates' vehicles (SetPlayerTeam must be used!).
| Name | Description |
| ---- | ----------- |
## ตัวอย่าง
```c
public OnGameModeInit()
{
EnableVehicleFriendlyFire();
return 1;
}
```
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- [SetPlayerTeam](../functions/SetPlayerTeam): Set a player's team.
| openmultiplayer/web/docs/translations/th/scripting/functions/EnableVehicleFriendlyFire.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/EnableVehicleFriendlyFire.md",
"repo_id": "openmultiplayer",
"token_count": 223
} | 435 |
---
title: GangZoneStopFlashForAll
description: Stops a gangzone flashing for all players.
tags: ["gangzone"]
---
## คำอธิบาย
Stops a gangzone flashing for all players.
| Name | Description |
| ---- | ---------------------------------------------------------------- |
| zone | The ID of the zone to stop flashing. Returned by GangZoneCreate. |
## ส่งคืน
1: The function executed successfully. Success is reported even if the gang zone wasn't flashing to begin with.
0: The function failed to execute. The gangzone specified does not exist.
## ตัวอย่าง
```c
new gangzone;
public OnGameModeInit()
{
gangzone = GangZoneCreate(1248.011, 2072.804, 1439.348, 2204.319);
return 1;
}
public OnPlayerDeath(playerid, killerid, WEAPON:reason)
{
GangZoneFlashForAll(gangzone, COLOR_RED);
return 1;
}
public OnPlayerSpawn(playerid)
{
GangZoneStopFlashForAll(gangzone);
return 1;
}
```
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- [GangZoneCreate](../functions/GangZoneCreate): Create a gangzone.
- [GangZoneDestroy](../functions/GangZoneDestroy): Destroy a gangzone.
- [GangZoneShowForPlayer](../functions/GangZoneShowForPlayer): Show a gangzone for a player.
- [GangZoneShowForAll](../functions/GangZoneShowForAll): Show a gangzone for all players.
- [GangZoneHideForPlayer](../functions/GangZoneHideForPlayer): Hide a gangzone for a player.
- [GangZoneHideForAll](../functions/GangZoneHideForAll): Hide a gangzone for all players.
- [GangZoneFlashForPlayer](../functions/GangZoneFlashForPlayer): Make a gangzone flash for a player.
- [GangZoneFlashForAll](../functions/GangZoneFlashForAll): Make a gangzone flash for all players.
- [GangZoneStopFlashForPlayer](../functions/GangZoneStopFlashForPlayer): Stop a gangzone flashing for a player.
| openmultiplayer/web/docs/translations/th/scripting/functions/GangZoneStopFlashForAll.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/GangZoneStopFlashForAll.md",
"repo_id": "openmultiplayer",
"token_count": 683
} | 436 |
---
title: GetObjectPos
description: Get the position of an object.
tags: []
---
## คำอธิบาย
Get the position of an object.
| Name | Description |
| -------- | ------------------------------------------------------------------- |
| objectid | The ID of the object to get the position of.. |
| &Float:X | A variable in which to store the X coordinate, passed by reference. |
| &Float:Y | A variable in which to store the Y coordinate, passed by reference. |
| &Float:Z | A variable in which to store the Z coordinate, passed by reference. |
## ส่งคืน
1: The function executed successfully.
0: The function failed to execute. The specified object does not exist.
## ตัวอย่าง
```c
new Float:x, Float:y, Float:z;
GetObjectPos(objectid, x, y, z);
```
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- [CreateObject](../functions/CreateObject): Create an object.
- [DestroyObject](../functions/DestroyObject): Destroy an object.
- [IsValidObject](../functions/IsValidObject): Checks if a certain object is vaild.
- [MoveObject](../functions/MoveObject): Move an object.
- [StopObject](../functions/StopObject): Stop an object from moving.
- [SetObjectPos](../functions/SetObjectPos): Set the position of an object.
- [SetObjectRot](../functions/SetObjectRot): Set the rotation of an object.
- [GetObjectRot](../functions/GetObjectRot): Check the rotation of an object.
- [AttachObjectToPlayer](../functions/AttachObjectToPlayer): Attach an object to a player.
- [CreatePlayerObject](../functions/CreatePlayerObject): Create an object for only one player.
- [DestroyPlayerObject](../functions/DestroyPlayerObject): Destroy a player object.
- [IsValidPlayerObject](../functions/IsValidPlayerObject): Checks if a certain player object is vaild.
- [MovePlayerObject](../functions/MovePlayerObject): Move a player object.
- [StopPlayerObject](../functions/StopPlayerObject): Stop a player object from moving.
- [SetPlayerObjectPos](../functions/SetPlayerObjectPos): Set the position of a player object.
- [SetPlayerObjectRot](../functions/SetPlayerObjectRot): Set the rotation of a player object.
- [GetPlayerObjectPos](../functions/GetPlayerObjectPos): Locate a player object.
- [GetPlayerObjectRot](../functions/GetPlayerObjectRot): Check the rotation of a player object.
- [AttachPlayerObjectToPlayer](../functions/AttachPlayerObjectToPlayer): Attach a player object to a player.
| openmultiplayer/web/docs/translations/th/scripting/functions/GetObjectPos.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/GetObjectPos.md",
"repo_id": "openmultiplayer",
"token_count": 808
} | 437 |
---
title: GetPlayerCameraTargetActor
description: Allows you to retrieve the ID of the actor the player is looking at (in any).
tags: ["player"]
---
:::warning
ฟังก์ชั่นนี้ถูกเพิ่มใน SA-MP 0.3.7 และจะไม่ทำงานในเวอร์ชั่นก่อนหน้านี้!
:::
## คำอธิบาย
Allows you to retrieve the ID of the actor the player is looking at (in any).
| Name | Description |
| -------- | ------------------------------------------------ |
| playerid | The ID of the player to get the target actor of. |
## ส่งคืน
The ID of the actor the player is looking at.
## ตัวอย่าง
```c
new bool:ActorHandsup[MAX_ACTORS];
public OnPlayerConnect(playerid)
{
EnablePlayerCameraTarget(playerid, 1);
return 1;
}
public OnPlayerUpdate(playerid)
{
// Find out what actor (if any) the player is LOOKING at
new playerTargetActor = GetPlayerCameraTargetActor(playerid);
// If they ARE looking at ANY actor
if (playerTargetActor != INVALID_ACTOR_ID)
{
// Store the player's weapon so we can check if they are armed
new playerWeapon = GetPlayerWeapon(playerid);
// Get the player's keys so we can check if they are aiming
new keys, updown, leftright;
GetPlayerKeys(playerid, keys, updown, leftright);
// If the actor hasn't put its hands up yet, AND the player is ARMED
if (!ActorHandsup[playerTargetActor] && playerWeapon >= 22 && playerWeapon <= 42 && keys & KEY_AIM)
{
// Apply 'hands up' animation
ApplyActorAnimation(playerTargetActor, "SHOP", "SHP_HandsUp_Scr",4.1,0,0,0,1,0);
// Set 'ActorHandsup' to true, so the animation won't keep being reapplied
ActorHandsup[playerTargetActor] = true;
}
}
return 1;
}
```
## บันทึก
:::tip
This function only tells you which actor (if any) the player is looking at. To find out if they are aiming at them, you need to use GetPlayerTargetActor.
:::
:::warning
This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player.
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- [GetPlayerTargetActor](../functions/GetPlayerTargetActor): Gets id of an actor which is aimed by certain player.
- [GetPlayerCameraTargetPlayer](../functions/GetPlayerCameratargetPlayer): Get the ID of the player a player is looking at.
- [GetPlayerCameraTargetVehicle](../functions/GetPlayerCameraTargetVehicle): Get the ID of the vehicle a player is looking at.
- [GetPlayerCameraTargetObject](../functions/GetPlayerCameraTargetObject): Get the ID of the object a player is looking at.
- [GetPlayerCameraFrontVector](../functions/GetPlayerCaemraFrontVector): Get the player's camera front vector
| openmultiplayer/web/docs/translations/th/scripting/functions/GetPlayerCameraTargetActor.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/GetPlayerCameraTargetActor.md",
"repo_id": "openmultiplayer",
"token_count": 1107
} | 438 |
---
title: GetPlayerSurfingObjectID
description: Returns the ID of the object the player is surfing on.
tags: ["player"]
---
## คำอธิบาย
Returns the ID of the object the player is surfing on.
| Name | Description |
| -------- | --------------------------------------- |
| playerid | The ID of the player surfing the object |
## ส่งคืน
The ID of the moving object the player is surfing. If the player isn't surfing a moving object, it will return INVALID_OBJECT_ID
## ตัวอย่าง
```c
/* when the player types 'objectsurfing' in to the chat box, they'll see this.*/
public OnPlayerText(playerid, text[])
{
if (strcmp(text, "objectsurfing", true) == 0)
{
new
szMessage[30];
format(szMessage, sizeof(szMessage), "You're surfing on object #%d.", GetPlayerSurfingObjectID(playerid));
SendClientMessage(playerid, 0xA9C4E4FF, szMessage);
}
return 0;
}
```
## ฟังก์ชั่นที่เกี่ยวข้องกัน
| openmultiplayer/web/docs/translations/th/scripting/functions/GetPlayerSurfingObjectID.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/GetPlayerSurfingObjectID.md",
"repo_id": "openmultiplayer",
"token_count": 433
} | 439 |
---
title: GetSVarInt
description: Gets an integer server variable's value.
tags: []
---
:::warning
This function was added in SA-MP 0.3.7 R2 and will not work in earlier versions!
:::
## คำอธิบาย
Gets an integer server variable's value.
| Name | Description |
| ------- | --------------------------------------------------------------------------- |
| varname | The name of the server variable (case-insensitive). Assigned in SetSVarInt. |
## ส่งคืน
The integer value of the specified server variable. It will still return 0 if the variable is not set.
## ตัวอย่าง
```c
// set "Version"
SetSVarInt("Version", 37);
// will print version that server has
printf("Version: %d", GetSVarInt("Version"));
```
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- SetSVarInt: Set an integer for a server variable.
- 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/GetSVarInt.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/GetSVarInt.md",
"repo_id": "openmultiplayer",
"token_count": 450
} | 440 |
---
title: GetVehicleModelInfo
description: Retrieve information about a specific vehicle model such as the size or position of seats.
tags: ["vehicle"]
---
## คำอธิบาย
Retrieve information about a specific vehicle model such as the size or position of seats
| Name | Description |
| ------------ | ------------------------------------ |
| vehiclemodel | The vehicle model to get info of. |
| infotype | The type of information to retrieve. |
| &Float:X | A float to store the X value. |
| &Float:Y | A float to store the Y value. |
| &Float:Z | A float to store the Z value. |
## ส่งคืน
The vehicle info is stored in the specified variables.
## ตัวอย่าง
```c
new Float:X, Float:Y, Float:Z;
GetVehicleModelInfo(411, VEHICLE_MODEL_INFO_SIZE, X, Y, Z); //Get the size of vehicle model 411 (Infernus)
printf("The infernus is %.1fm wide, %.1fm long and %.1fm high", X, Y, Z);
//Prints "The infernus is 2.3m wide, 5.7m long and 1.3m high" into the console
```
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- GetVehicleModel: Get the model id of a vehicle.
| openmultiplayer/web/docs/translations/th/scripting/functions/GetVehicleModelInfo.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/GetVehicleModelInfo.md",
"repo_id": "openmultiplayer",
"token_count": 482
} | 441 |
---
title: HideMenuForPlayer
description: Hides a menu for a player.
tags: ["player", "menu"]
---
## คำอธิบาย
Hides a menu for a player.
| Name | Description |
| -------- | ----------------------------------------------------------------------------------------- |
| menuid | The ID of the menu to hide. Returned by CreateMenu and passed to OnPlayerSelectedMenuRow. |
| playerid | The ID of the player that the menu will be hidden for. |
## ส่งคืน
1: The function was executed successfully.
0: The function failed to execute.
## ตัวอย่าง
```c
if (strcmp(cmdtext, "/menuhide", true) == 0)
{
new Menu:myMenu = GetPlayerMenu(playerid);
HideMenuForPlayer(myMenu, playerid);
return 1;
}
```
## บันทึก
:::tip
Crashes the both server and player if an invalid menu ID given.
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- ShowMenuForPlayer: Show a menu for a player.
- AddMenuItem: Add an item to a menu.
- SetMenuColumnHeader: Set the header for one of the columns in a menu.
- CreateMenu: Create a menu.
- [CreateMenu](../../scripting/functions/CreateMenu.md): Create a menu.
- [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.
- [ShowMenuForPlayer](../../scripting/functions/ShowMenuForPlayer.md): Show a menu for a player.
| openmultiplayer/web/docs/translations/th/scripting/functions/HideMenuForPlayer.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/HideMenuForPlayer.md",
"repo_id": "openmultiplayer",
"token_count": 638
} | 442 |
---
title: IsPlayerStreamedIn
description: Checks if a player is streamed in another player's client.
tags: ["player"]
---
## คำอธิบาย
Checks if a player is streamed in another player's client.
| Name | Description |
| ----------- | ------------------------------------------------------------- |
| playerid | The ID of the player to check is streamed in. |
| forplayerid | The ID of the player to check if playerid is streamed in for. |
## ส่งคืน
1: The player is streamed in.
0: The player is not streamed in.
## ตัวอย่าง
```c
if (IsPlayerStreamedIn(playerid, 0))
{
SendClientMessage(playerid, -1, "ID 0 can see you.");
}
```
## บันทึก
:::tip
Players stream out if they are more than 150 meters away (see server.cfg - stream_distance)
:::
:::warning
Players aren't streamed in on their own client, so if playerid is the same as forplayerid it will return false!
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- [IsActorStreamedIn](../../scripting/functions/IsActorStreamedIn.md): Checks if an actor is streamed in for a player.
- [IsVehicleStreamedIn](../../scripting/functions/IsVehicleStreamedIn.md): Checks if a vehicle is streamed in for a player.
- [OnPlayerStreamIn](../../scripting/callbacks/OnPlayerStreamIn.md): Called when a player streams in for another player.
- [OnPlayerStreamOut](../../scripting/callbacks/OnPlayerStreamOut.md): Called when a player streams out for another player.
- [OnVehicleStreamIn](../../scripting/callbacks/OnVehicleStreamIn.md): Called when a vehicle streams in for a player.
- [OnVehicleStreamOut](../../scripting/callbacks/OnVehicleStreamOut.md): Called when a vehicle streams out for a player.
| openmultiplayer/web/docs/translations/th/scripting/functions/IsPlayerStreamedIn.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/IsPlayerStreamedIn.md",
"repo_id": "openmultiplayer",
"token_count": 646
} | 443 |
---
title: NetStats_BytesSent
description: Gets the amount of data (in bytes) that the server has sent to the player.
tags: []
---
## คำอธิบาย
Gets the amount of data (in bytes) that the server has sent to the player.
| Name | Description |
| -------- | ------------------------------------------ |
| playerid | The ID of the player to get the data from. |
## ส่งคืน
[edit]
## ตัวอย่าง
```c
public OnPlayerCommandText(playerid,cmdtext[])
{
if (!strcmp(cmdtext, "/bytes_sent"))
{
new szString[144];
format(szString, sizeof(szString), "You have sent %i bytes of information to the server.", NetStats_BytesSent(playerid));
SendClientMessage(playerid, -1, szString);
}
return 1;
}
```
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- [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_MessagesSent](../functions/NetStats_MessagesSent.md): Get the number of network messages the server has sent to the player.
- [NetStats_BytesReceived](../functions/NetStats_BytesReceived.md): Get the amount of information (in bytes) that the server has received from 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.
- [NetStats_GetIpPort](../functions/NetStats_GetIpPort.md): Get a player's IP and port.
| openmultiplayer/web/docs/translations/th/scripting/functions/NetStats_BytesSent.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/NetStats_BytesSent.md",
"repo_id": "openmultiplayer",
"token_count": 735
} | 444 |
---
title: PlayerTextDrawColor
description: Sets the text color of a player-textdraw.
tags: ["player", "textdraw", "playertextdraw"]
---
## คำอธิบาย
Sets the text color of a player-textdraw
| Name | Description |
| -------- | ------------------------------------------------------- |
| playerid | The ID of the player who's textdraw to set the color of |
| text | The TextDraw to change. |
| color | The color in hexadecimal format. |
## ส่งคืน
This function does not return any specific values.
## ตัวอย่าง
```c
new PlayerText:pTextdraw[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
pTextdraw[playerid] = CreatePlayerTextDraw(playerid, x, y, "...");
PlayerTextDrawColor(playerid, pTextdraw[playerid], 0xFF0000FF); // Red text
PlayerTextDrawShow(playerid, pTextdraw[playerid]);
return 1;
}
```
## บันทึก
:::tip
You can also use Gametext colors in textdraws. The textdraw must be re-shown to the player in order to update the color.
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- CreatePlayerTextDraw: Create a player-textdraw.
- PlayerTextDrawDestroy: Destroy 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.
- PlayerTextDrawShow: Show a player-textdraw.
- PlayerTextDrawHide: Hide a player-textdraw.
| openmultiplayer/web/docs/translations/th/scripting/functions/PlayerTextDrawColor.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/PlayerTextDrawColor.md",
"repo_id": "openmultiplayer",
"token_count": 801
} | 445 |
---
title: PutPlayerInVehicle
description: Puts a player in a vehicle.
tags: ["player", "vehicle"]
---
## คำอธิบาย
Puts a player in a vehicle.
| Name | Description |
| --------- | ------------------------------------------- |
| playerid | The ID of the player to put in a vehicle. |
| vehicleid | The ID of the vehicle to put the player in. |
| seatid | The ID of the seat to put the player in. |
## ส่งคืน
1: The function was executed successfully.
0: The function failed to execute. The player or vehicle don't exist.
## ตัวอย่าง
```c
public OnPlayerEnterVehicle(playerid,vehicleid,ispassanger)
{
PutPlayerInVehicle(playerid, vehicleid, 0);
return 1;
}
```
```
0 - Driver
1 - Front passenger
2 - Back-left passenger
3 - Back-right passenger
4+ - Passenger seats (coach etc.)
```
## บันทึก
:::tip
You can use GetPlayerVehicleSeat in a loop to check if a seat is occupied by any players.
:::
:::warning
If the seat is invalid or is taken, will cause a crash when they EXIT the vehicle.
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- RemovePlayerFromVehicle: Throw a player out of their vehicle.
- GetPlayerVehicleID: Get the ID of the vehicle the player is in.
- GetPlayerVehicleSeat: Check what seat a player is in.
- OnPlayerEnterVehicle: Called when a player starts to enter a vehicle.
| openmultiplayer/web/docs/translations/th/scripting/functions/PutPlayerInVehicle.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/PutPlayerInVehicle.md",
"repo_id": "openmultiplayer",
"token_count": 542
} | 446 |
---
title: SendPlayerMessageToAll
description: Sends a message in the name of a player to all other players on the server.
tags: ["player"]
---
## คำอธิบาย
Sends a message in the name of a player to all other players on the server. The line will start with the sender's name in their color, followed by the message in white.
| Name | Description |
| --------------- | --------------------------------------------------------------- |
| senderid | The ID of the sender. If invalid, the message will not be sent. |
| const message[] | The message that will be sent. |
## ส่งคืน
This function does not return any specific values.
## ตัวอย่าง
```c
public OnPlayerText(playerid, text[])
{
// format a message to contain the player's id in front of it
new string[128];
format(string, sizeof(string), "(%d) %s", playerid, text);
SendPlayerMessageToAll(playerid, string);
return 0; // return 0 prevents the original message being sent
// Assuming 'playerid' is 0 and the player is called Tenpenny, the output will be 'Tenpenny:(0) <message>'
}
```
## บันทึก
:::warning
Avoid using format specifiers in your messages without formatting the string that is sent. It will result in crashes otherwise.
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- SendPlayerMessageToPlayer: Force a player to send text for one player.
- SendClientMessageToAll: Send a message to all players.
- OnPlayerText: Called when a player sends a message via the chat.
| openmultiplayer/web/docs/translations/th/scripting/functions/SendPlayerMessageToAll.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/SendPlayerMessageToAll.md",
"repo_id": "openmultiplayer",
"token_count": 598
} | 447 |
---
title: SetObjectNoCameraCol
description: Disable collisions between players' cameras and the specified object.
tags: []
---
:::warning
ฟังก์ชั่นนี้ถูกเพิ่มใน SA-MP 0.3.7 และจะไม่ทำงานในเวอร์ชั่นก่อนหน้านี้!
:::
## คำอธิบาย
Disable collisions between players' cameras and the specified object.
| Name | Description |
| -------- | ----------------------------------------------------- |
| objectid | The ID of the object to disable camera collisions on. |
## ส่งคืน
1: The function was executed successfully.
0: The function failed to execute. The object specified does not exist.
## ตัวอย่าง
```c
public OnObjectMoved(objectid)
{
new Float:objX, Float:objY, Float:objZ;
GetObjectPos(objectid, objX, objY, objZ);
if (objX >= 3000.0 || objY >= 3000.0 || objX <= -3000.0 || objY <= -3000.0)
{
SetObjectNoCameraCol(objectid);
}
return 1;
}
```
## บันทึก
:::tip
This only works outside the map boundaries (past -3000/3000 units on the x and/or y axis).
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- SetPlayerObjectNoCameraCol: Disables collisions between camera and player object.
| openmultiplayer/web/docs/translations/th/scripting/functions/SetObjectNoCameraCol.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/SetObjectNoCameraCol.md",
"repo_id": "openmultiplayer",
"token_count": 594
} | 448 |
---
title: SetPlayerDrunkLevel
description: Sets the drunk level of a player which makes the player's camera sway and vehicles hard to control.
tags: ["player"]
---
## คำอธิบาย
Sets the drunk level of a player which makes the player's camera sway and vehicles hard to control.
| Name | Description |
| -------- | ----------------------------------------------- |
| playerid | The ID of the player to set the drunkenness of. |
| level | The level of drunkenness to set. |
## ส่งคืน
1: The function executed successfully.
0: The function failed to execute. This means the player is not connected.
## ตัวอย่าง
```c
if (strcmp(cmdtext, "/drunk", true) == 0)
{
SetPlayerDrunkLevel (playerid, 4000);
SendClientMessage(playerid, 0xFFFFFFAA, "You are now drunk; don't drink and drive!");
return 1;
}
```
## บันทึก
:::tip
Players' drunk level will automatically decrease over time, based on their FPS (players with 50 FPS will lose 50 'levels' per second. This is useful for determining a player's FPS!). In 0.3a the drunk level will decrement and stop at 2000. In 0.3b+ the drunk level decrements to zero.) Levels over 2000 make the player drunk (camera swaying and vehicles difficult to control). Max drunk level is 50000. While the drunk level is above 5000, the player's HUD (radar etc.) will be hidden.
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- GetPlayerDrunkLevel: Returns the current drunk level of a player.
| openmultiplayer/web/docs/translations/th/scripting/functions/SetPlayerDrunkLevel.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/SetPlayerDrunkLevel.md",
"repo_id": "openmultiplayer",
"token_count": 544
} | 449 |
---
title: SetPlayerRaceCheckpoint
description: Creates a race checkpoint.
tags: ["player", "checkpoint", "racecheckpoint"]
---
## คำอธิบาย
Creates a race checkpoint. When the player enters it, the OnPlayerEnterRaceCheckpoint callback is called.
| Name | Description |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| playerid | The ID of the player to set the checkpoint for |
| type | Type of checkpoint.0-Normal, 1-Finish, 2-Nothing(Only the checkpoint without anything on it), 3-Air normal, 4-Air finish, 5-Air (rotates and stops), 6-Air (increases, decreases and disappears), 7-Air (swings down and up), 8-Air (swings up and down) |
| Float:x | X-Coordinate |
| Float:y | Y-Coordinate |
| Float:z | Z-Coordinate |
| Float:nextx | X-Coordinate of the next point, for the arrow facing direction |
| Float:nexty | Y-Coordinate of the next point, for the arrow facing direction |
| Float:nextz | Z-Coordinate of the next point, for the arrow facing direction |
| Float:size | Size (diameter) of the checkpoint |
## ส่งคืน
1: The function executed successfully.
0: The function failed to execute. This means the player specified does not exist.
## ตัวอย่าง
```c
//from Yagu's race filterscript, (c) by Yagu
public SetRaceCheckpoint(playerid, Airrace, target, next)
{
if (next == -1 && Airrace == 0)
SetPlayerRaceCheckpoint(playerid,1,RaceCheckpoints[target][0],RaceCheckpoints[target][1],RaceCheckpoints[target][2],
0.0,0.0,0.0,CPsize);
else if (next == -1 && Airrace == 1)
SetPlayerRaceCheckpoint(playerid,4,RaceCheckpoints[target][0],RaceCheckpoints[target][1],RaceCheckpoints[target][2],
0.0,0.0,0.0,CPsize);
else if (Airrace == 1)
SetPlayerRaceCheckpoint(playerid,3,RaceCheckpoints[target][0],RaceCheckpoints[target][1],RaceCheckpoints[target][2],
RaceCheckpoints[next][0],RaceCheckpoints[next][1],RaceCheckpoints[next][2],CPsize);
else
SetPlayerRaceCheckpoint(playerid,0,RaceCheckpoints[target][0],RaceCheckpoints[target][1],RaceCheckpoints[target][2],
RaceCheckpoints[next][0],RaceCheckpoints[next][1],RaceCheckpoints[next][2],CPsize);
}
```
## บันทึก
:::warning
Race checkpoints are asynchronous, meaning only one can be shown at a time. To 'stream' race checkpoints (only show them when players are close enough), use a race checkpoint streamer.
:::
## ฟังก์ชั่นที่เกี่ยวข้องกัน
- SetPlayerCheckpoint: Create a checkpoint for a player.
- DisablePlayerCheckpoint: Disable the player's current checkpoint.
- IsPlayerInCheckpoint: Check if a player is in a checkpoint.
- DisablePlayerRaceCheckpoint: Disable the player's current race checkpoint.
- IsPlayerInRaceCheckpoint: Check if a player is in a race checkpoint.
- OnPlayerEnterCheckpoint: Called when a player enters a checkpoint.
- OnPlayerLeaveCheckpoint: Called when a player leaves a checkpoint.
- OnPlayerEnterRaceCheckpoint: Called when a player enters a race checkpoint.
- OnPlayerLeaveRaceCheckpoint: Called when a player leaves a race checkpoint.
| openmultiplayer/web/docs/translations/th/scripting/functions/SetPlayerRaceCheckpoint.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/SetPlayerRaceCheckpoint.md",
"repo_id": "openmultiplayer",
"token_count": 3048
} | 450 |