text
stringlengths
1
2.83M
id
stringlengths
16
152
metadata
dict
__index_level_0__
int64
0
949
--- title: CreateObject description: Kreira objekat na određenim kordinatama iz igre. tags: [] --- ## Deskripcija Kreira objekat na određenim kordinatama iz igre. | Ime | Deskripcija | | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | modelid | Model za kreirati. | | Float:X | X kordinata za kreirati objekat. | | Float:Y | Y kordinata za kreirati objekat. | | Float:Z | Z kordinata za kreirati objekat. | | Float:rX | X rotacija za objekat. | | Float:rY | Y rotacija za objekat. | | Float:rZ | Z rotacija za objekat. | | Float:DrawDistance | (neobavezno) Udaljenost na kojoj San Andreas prikazuje predmete. 0.0 uzrokovat će prikazivanje objekata na zadanim udaljenostima. Upotrebljiv od 0,3b. Ograničeno na 300 prije 0,3x. | ## Primjeri ```c public OnGameModeInit() { CreateObject(2587, 2001.195679, 1547.113892, 14.283400, 0.0, 0.0, 96.0); // Objekt će se prikazati na zadanoj udaljenosti. CreateObject(2587, 2001.195679, 1547.113892, 14.283400, 0.0, 0.0, 96.0, 300.0); // Objekt će se prikazati na 300,0 jedinica. return 1; } ``` ## Zabilješke :::tip Postoji limit od 1000 objekata (MAX_OBJECTS). Da biste zaobišli ovo ograničenje, možete upotrijebiti streamer. ::: ## Srodne Funkcije - [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. - [SetObjectMaterialText](SetObjectMaterialText): Replace the texture of an object with text. - [SetObjectMaterial](SetObjectMaterial): Zamijeni teksturu objekta sa teksturom drugog modela iz igre. - [CreatePlayerObject](CreatePlayerObject): Kreiraj objekat za samo jednog igrača. - [DestroyPlayerObject](DestroyPlayerObject): Destroy a player object. - [IsValidPlayerObject](IsValidPlayerObject): Provjeri da li je određeni player objekat validan. - [MovePlayerObject](MovePlayerObject): Pomjeri player objekat. - [StopPlayerObject](StopPlayerObject): Zaustavi player objekat od kretanja. - [SetPlayerObjectPos](SetPlayerObjectPos): Postavi poziciju player objekta. - [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. - [SetPlayerObjectMaterialText](SetPlayerObjectMaterialText): Zamijeni teksturu player objekta sa tekstom. - [SetPlayerObjectMaterial](SetPlayerObjectMaterial): Zamijeni teksturu player objekta sa teksturom drugog modela iz igre.
openmultiplayer/web/docs/translations/bs/scripting/functions/CreateObject.md/0
{ "file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/CreateObject.md", "repo_id": "openmultiplayer", "token_count": 2452 }
345
--- title: DetachTrailerFromVehicle description: Razdvaja vozilo i prikolicu, ukoliko postoji. tags: ["vehicle"] --- ## Deskripcija Razdvaja vozilo i prikolicu, ukoliko postoji. | Ime | Deskripcija | | --------- | -------------------------- | | vehicleid | ID vozilo koji vuče | ## Returns Ova funkcija ne returna (vraća) nikakve posebne vrijednosti. ## Primjeri ```c DetachTrailerFromVehicle(vehicleid); ``` ## Srodne Funkcije - [AttachTrailerToVehicle](AttachTrailerToVehicle): Prikvači prikolicu za vozilo. - [IsTrailerAttachedToVehicle](IsTrailerAttachedToVehicle): Provjeri da li je prikolica prikvačena za vozilo. - [GetVehicleTrailer](GetVehicleTrailer): Provjeri koju prikolicu vozilo vuče.
openmultiplayer/web/docs/translations/bs/scripting/functions/DetachTrailerFromVehicle.md/0
{ "file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/DetachTrailerFromVehicle.md", "repo_id": "openmultiplayer", "token_count": 316 }
346
--- title: EnableZoneNames description: Ova funkcija omogućava uključivanje naziva zona / područja kao što je "Vinewood" ili "Doherty" tekst u donjem desnom dijelu ekrana dok ulaze u to područje. tags: [] --- ## Deskripcija Ova funkcija omogućava uključivanje naziva zona / područja kao što je "Vinewood" ili "Doherty" tekst u donjem desnom dijelu ekrana dok ulaze u to područje. Ovo je opcija gamemodea i treba je postaviti u callbacku OnGameModeInit. | Ime | Deskripcija | | ------ | ------------------------------------------------------------------------------------------------------ | | enable | Opcija za prebacivanje želite li uključiti ili isključiti nazive zona. 0 je isključeno, a 1 uključeno. | ## Returns Ova funkcija ne returna (vraća) nikakve posebne vrijednosti. ## Primjeri ```c public OnGameModeInit() { EnableZoneNames(1); return 1; } ``` ## Zabilješke :::warning Ova je funkcija uklonjena u SA-MP 0.3. To je bilo zbog crashova koje je izazvao. ::: ## Srodne Funkcije
openmultiplayer/web/docs/translations/bs/scripting/functions/EnableZoneNames.md/0
{ "file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/EnableZoneNames.md", "repo_id": "openmultiplayer", "token_count": 503 }
347
--- title: GangZoneStopFlashForPlayer description: Zaustavlja treptanje gangzone za igrača. tags: ["player", "gangzone"] --- ## Deskripcija Zaustavlja treptanje gangzone za igrača. | Ime | Deskripcija | | -------- | ------------------------------------------- | | playerid | ID igrača za stopiranje treptanja gangzone. | | zone | ID gangzoneza prestati treptati. | ## Returns Ova funkcija ne returna (vraća) nikakve posebne vrijednosti. ## Primjeri ```c new gGangZoneId; public OnGameModeInit() { gGangZoneId = GangZoneCreate(1248.011, 2072.804, 1439.348, 2204.319); return 1; } public OnPlayerSpawn(playerid) { GangZoneFlashForPlayer(playerid, gGangZoneId, COLOR_RED); return 1; } public OnPlayerEnterVehicle(playerid, vehicleid) { GangZoneStopFlashForPlayer(playerid, gGangZoneId); return 1; } ``` ## Srodne Funkcije - [GangZoneCreate](GangZoneCreate): Kreiraj gangzonu. - [GangZoneDestroy](GangZoneDestroy): Uništi gang zonu. - [GangZoneShowForPlayer](GangZoneShowForPlayer): Prikaži gang zonu za igrača. - [GangZoneShowForAll](GangZoneShowForAll): Prikaži gang zonu za sve igrače. - [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. - [GangZoneStopFlashForAll](GangZoneStopFlashForAll): Zaustavi gang zonu da bljeska za sve igrače.
openmultiplayer/web/docs/translations/bs/scripting/functions/GangZoneStopFlashForPlayer.md/0
{ "file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/GangZoneStopFlashForPlayer.md", "repo_id": "openmultiplayer", "token_count": 677 }
348
--- title: GetObjectPos description: Dobij poziciju objekta. tags: [] --- ## Deskripcija Dobij poziciju objekta. | Ime | Deskripcija | | -------- | ---------------------------------------------------------------------- | | objectid | ID objekta za dobivanje pozicije.. | | &Float:X | Varijabla u kojoj se pohranjuju X koordinate, proslijeđena referencom. | | &Float:Y | Varijabla u kojoj se pohranjuju Y koordinate, proslijeđena referencom. | | &Float:Z | Varijabla u kojoj se pohranjuju Z koordinate, proslijeđena referencom. | ## Returns 1: Funkcija je uspješno izvršena. 0: Funkcija nije uspjela da se izvrši. Navedeni objekt ne postoji. ## Primjeri ```c new Float:x, Float:y, Float:z; GetObjectPos(objectid, x, y, z); ``` ## Srodne Funkcije - [CreateObject](CreateObject): Kreiraj objekt. - [DestroyObject](DestroyObject): Uništi objekt - [IsValidObject](IsValidObject): Provjerava da li je određeni objekt validan. - [MoveObject](MoveObject): Pomjeri objekt. - [StopObject](StopObject): Zaustavi pomjeranje objekta. - [SetObjectPos](SetObjectPos): Postavi poziciju objektu. - [SetObjectRot](SetObjectRot): Postavi rotaciju objektu. - [GetObjectRot](GetObjectRot): Provjeri rotaciju objekta. - [AttachObjectToPlayer](AttachObjectToPlayer): Postavi objekt na igrača. - [CreatePlayerObject](CreatePlayerObject): Kreiraj objekt samo za jednog igrača. - [DestroyPlayerObject](DestroyPlayerObject): Uništi player-objekt - [IsValidPlayerObject](IsValidPlayerObject): Provjerava da li je određeni player-objekt validan. - [MovePlayerObject](MovePlayerObject): Pomjeri player-objekt - [StopPlayerObject](StopPlayerObject): Zaustavi pomjeranje player-objekta - [SetPlayerObjectPos](SetPlayerObjectPos): Postavi poziciju player-objektu - [SetPlayerObjectRot](SetPlayerObjectRot): Postavi rotaciju player-objektu - [GetPlayerObjectPos](GetPlayerObjectPos): Pronađi player-objekt - [GetPlayerObjectRot](GetPlayerObjectRot): Provjeri rotaciju player-objekta - [AttachPlayerObjectToPlayer](AttachPlayerObjectToPlayer): Postavi player-objekt na igrača.
openmultiplayer/web/docs/translations/bs/scripting/functions/GetObjectPos.md/0
{ "file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/GetObjectPos.md", "repo_id": "openmultiplayer", "token_count": 833 }
349
--- title: GetPlayerTime description: Doznajte trenutno igračevo vrijeme igre. tags: ["player"] --- ## Deskripcija Doznajte trenutno igračevo vrijeme igre. Postavlja SetWorldTime ili vraća vrijeme igre automatski ako se koristi TogglePlayerClock. | Ime | Deskripcija | | -------- | ------------------------------------------------------- | | playerid | ID igrača za dobiti trenutno vrijeme u igri. | | &hour | Varijabla za pohraniti sate, proslijeđeno referencom. | | &minute | Varijabla za pohraniti minute, proslijeđeno referencom. | ## Returns 1: Funkcija uspješno izvršena.. 0: Funkcija neuspješno izvršena. Navedeni igrač ne postoji. Trenutno vrijeme igre pohranjeno je u navedenim varijablama. ## Primjeri ```c new hour, minutes; GetPlayerTime(playerid, hour, minutes); if (hour == 13 && minutes == 37) { SendClientMessage(playerid, COLOR_WHITE, "Vrijeme je 13:37!"); } ``` ## Srodne Funkcije - [SetPlayerTime](SetPlayerTime): Postavi igraču vrijeme. - [SetWorldTime](SetWorldTime): Postavi globalno vrijeme servera. - [TogglePlayerClock](TogglePlayerClock): Uključite / isključite sat u gornjem desnom uglu.
openmultiplayer/web/docs/translations/bs/scripting/functions/GetPlayerTime.md/0
{ "file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/GetPlayerTime.md", "repo_id": "openmultiplayer", "token_count": 508 }
350
--- title: GetServerTickRate description: Dobiva brzinu označavanja (poput FPS-a) servera. tags: [] --- ## Deskripcija Dobiva brzinu označavanja (poput FPS-a) servera. ## Primjeri ```c printf("trenutna brzina označavanja servera je: %i", GetServerTickRate()); ``` ## Srodne Funkcije - [GetNetworkStats](GetNetworkStats): Dobiva mrežne statistike servera i sprema ih u string.
openmultiplayer/web/docs/translations/bs/scripting/functions/GetServerTickRate.md/0
{ "file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/GetServerTickRate.md", "repo_id": "openmultiplayer", "token_count": 152 }
351
--- title: GetVehiclePoolSize description: Dobiva najveći id vozila koji se trenutno koristi na serveru. tags: ["vehicle"] --- :::warning Ova funkcija je dodana u SA-MP 0.3.7 i ne radi u nižim verzijama! ::: ## Deskripcija Dobiva najveći id vozila koji se trenutno koristi na serveru. ## Primjeri ```c RepairAllVehicles() { // vehicleids počinje sa 1 for(new i = 1, j = GetVehiclePoolSize(); i <= j; i++) { RepairVehicle(i); } } ``` ## Srodne Funkcije - [GetPlayerPoolSize](GetPlayerPoolSize): Dobija najviši playerid povezan na server.
openmultiplayer/web/docs/translations/bs/scripting/functions/GetVehiclePoolSize.md/0
{ "file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/GetVehiclePoolSize.md", "repo_id": "openmultiplayer", "token_count": 250 }
352
--- title: IsObjectHiddenForPlayer description: Provjerava da li je objekat sakriven za igrača. tags: ["player", "object"] --- <VersionWarn version='omp v1.1.0.2612' /> ## Deskripcija Provjerava da li je objekat sakriven za igrača. ## Parametri | Ime | Deskripcija | |----------|--------------------------------| | playerid | ID igrača. | | objectid | ID objekta za provjeriti. | ## Returnovi `true` - Objekat je sakriven za igrača. `false` - Objekat nije sakriven za igrača. ## Primjeri ```c new gObject; public OnGameModeInit() { gObject = CreateObject(1431, 921.12201, -1206.78613, 16.52670, 0.00000, 0.00000, 90.00000); return 1; } public OnPlayerConnect(playerid) { HideObjectForPlayer(playerid, gObject); return 1; } public OnPlayerSpawn(playerid) { if (IsObjectHiddenForPlayer(playerid, gObject)) { printf("Objekat %d je sakriven za igrača %d", gObject, playerid); } return 1; } ``` ## Zabilješke :::tip Možeš sakriti objekte za određenog igrača pomoću [HideObjectForPlayer](HideObjectForPlayer) funkcije. ::: ## Srodne Funkcije - [HideObjectForPlayer](HideObjectForPlayer): Sakriva objekat igraču. - [ShowObjectForPlayer](ShowObjectForPlayer): Prikaže objekat igraču. - [CreateObject](CreateObject): Kreira objekat.
openmultiplayer/web/docs/translations/bs/scripting/functions/IsObjectHiddenForPlayer.md/0
{ "file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/IsObjectHiddenForPlayer.md", "repo_id": "openmultiplayer", "token_count": 583 }
353
--- title: IsValidActor description: Provjerava ako je ID aktora važeći. tags: [] --- :::warning Ova funkcija je dodana u SA-MP 0.3.7 i ne radi u nižim verzijama! ::: ## Deskripcija Provjerava ako je ID aktora važeći. | Ime | Deskripcija | | ------- | ------------------------ | | actorid | ID aktora za provjeriti. | ## Returns 1 - Aktor je važeći. 0 - Aktor je nevažeći. ## Primjeri ```c new gMyActor; public OnGameModeInit() { gMyActor = CreateActor(179, 316.1, -134.0, 999.6, 90.0); // Aktor kao prodavač u Ammunation-u. if (IsValidActor(gMyActor)) { SetActorHealth(gMyActor, 100); } return 1; } ``` ## Srodne Funkcije - [CreateActor](CreateActor): Kreiraj aktora. - [GetActorPoolSize](GetActorPoolSize): Dobij najveći actorid na serveru. - [SetActorHealth](SetActorHealth): Postavi zdravlje aktoru.
openmultiplayer/web/docs/translations/bs/scripting/functions/IsValidActor.md/0
{ "file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/IsValidActor.md", "repo_id": "openmultiplayer", "token_count": 385 }
354
--- title: NetStats_ConnectionStatus description: Dobija trenutni status veze igrača. tags: [] --- ## Deskripcija Dobija trenutni status veze igrača. | Ime | Deskripcija | | -------- | ------------------------------------ | | playerid | ID igrača za dobivanje statusa veze. | ## Returns IGračev [status konekcije](../resources/connectionstatus), kao cjelobrojna vrijednost. ## Primjeri ```c public OnPlayerCommandText(playerid,cmdtext[]) { if (!strcmp(cmdtext, "/connectionstatus")) { new szString[144]; format(szString, sizeof(szString), "Tvoj trenutni status konekcije: %i.", NetStats_ConnectionStatus(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_BytesReceived](NetStats_BytesReceived): Dohvatite količinu informacija (u bajtovima) koju je poslužitelj 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_GetIpPort](NetStats_GetIpPort): Nabavite IP adresu i port igrača. - [IsPlayerConnected](IsPlayerConnected): Provjerava da li je igrač konektovan na server. - [OnPlayerConnect](../callbacks/OnPlayerConnect): Pozvano kada se igrač konektuje na server. - [OnPlayerDisconnect](../callbacks/OnPlayerDisconnect): Pozvano kada igrač napusti server.
openmultiplayer/web/docs/translations/bs/scripting/functions/NetStats_ConnectionStatus.md/0
{ "file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/NetStats_ConnectionStatus.md", "repo_id": "openmultiplayer", "token_count": 871 }
355
--- title: PlayerTextDrawDestroy description: Uništi player-textdraw. tags: ["player", "textdraw", "playertextdraw"] --- ## Deskripcija Destroy a player-textdraw. | Ime | Deskripcija | | -------- | ----------------------------------------------- | | playerid | ID igrača čiji će player-textdraw biti uništen. | | text | ID textdrawa za uništiti. | ## 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, "..."); return 1; } public OnPlayerDisconnect(playerid, reason) { PlayerTextDrawDestroy(playerid, pTextdraw[playerid]); return 1; } ``` ## Srodne Funkcije - [CreatePlayerTextDraw](CreatePlayerTextDraw): Kreiraj 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. - [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/PlayerTextDrawDestroy.md/0
{ "file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/PlayerTextDrawDestroy.md", "repo_id": "openmultiplayer", "token_count": 818 }
356
--- title: RedirectDownload description: Preusmjerite preuzimanje prilagođenog AddCharModel ili AddSimpleModel uređaja na određenu HTTP web stranicu. tags: [] --- :::note This function was added in SA-MP 0.3.DL R1 and neće raditi u ranijim verzijama! ::: ## Deskripcija Preusmjerite preuzimanje prilagođenog AddCharModel ili AddSimpleModel uređaja na određenu HTTP web stranicu. ## Parameters | Ime | Deskripcija | | -------- | ----------------------------------------------------------- | | playerid | ID igrača koji je zatražio preuzimanje prilagođenih modela. | | url[] | URL za preusmjeravanje preuzimanja. | ## Return Values - 1: Funkcija uspješno izvršena. - 0: Funkcija neuspješno izvršena. ## Primjer upotrebe iz dl_redirect filterskripte ```c new baseurl[] = "https://files.sa-mp.com/server"; public OnPlayerRequestDownload(playerid, type, crc) { if (!IsPlayerConnected(playerid)) { return 0; } new fullURL[256], fileName[64], foundFileName = 0; if (type == DOWNLOAD_REQUEST_TEXTURE_FILE) { foundFileName = FindTextureFileNameFromCRC(crc, fileName, sizeof fileName); } else if (type == DOWNLOAD_REQUEST_MODEL_FILE) { foundFileName = FindModelFileNameFromCRC(crc, fileName, sizeof fileName); } if (foundFileName) { format(fullURL, sizeof fullURL, "%s/%s", baseurl, fileName); RedirectDownload(playerid, fullURL); } return 0; } ``` ## Srodne Funkcije - [AddCharModel](AddCharModel): Dodaje novi prilagođeni model za preuzeti. - [AddSimpleModel](AddSimpleModel): Dodaje novi prilagođeni model objekta za preuzeti. - [AddSimpleModelTimed](AddSimpleModelTimed): Dodaje novi prilagođeni model objekta za preuzeti. - [OnPlayerFinishedDownloading](../callbacks/OnPlayerFinishedDownloading): Pozvano kada igrač dovrši preuzimanje prilagođenih modela.
openmultiplayer/web/docs/translations/bs/scripting/functions/RedirectDownload.md/0
{ "file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/RedirectDownload.md", "repo_id": "openmultiplayer", "token_count": 846 }
357
--- title: SendPlayerMessageToAll description: Pošalji poruku u ime drugog igrača svim drugim igračima na serveru. tags: ["player"] --- ## Deskripcija Pošalji poruku u ime drugog igrača svim drugim igračima na serveru. Linija će početi sa imenom pošiljaoca u njegovoj boji, prateći poruku u bijeloj boji. | Ime | Deskripcija | | --------------- | --------------------------------------------------------- | | senderid | ID pošiljatelja. Ako je nevažeći, poruka se neće poslati. | | const message[] | Poruka koja će biti poslana. | ## Returns Ova funkcija ne returna (vraća) nikakve posebne vrijednosti. ## Primjeri ```c public OnPlayerText(playerid, text[]) { // formatiraj poruku da bi sadržala njegov ID pored imena new string[128]; format(string, sizeof(string), "(%d): %s", playerid, text); SendPlayerMessageToAll(playerid, string); return 0; // return 0 sprečava slanje originalne poruke // Pod pretpostavkom da je 'playerid' 0 i da se igrač zove Tenpenny, Izlaz će biti 'Tenpenny:(0) <message>' } ``` ## Zabilješke :::warning Izbjegavajte koristiti specifikatore formata u svojim porukama bez formatiranja poslanog stringa. U suprotnom će rezultirati padovima. ::: ## Srodne Funkcije - [SendPlayerMessageToPlayer](SendPlayerMessageToPlayer): Prisilite igrača da pošalje tekst za jednog igrača. - [SendClientMessageToAll](SendClientMessageToAll): Pošalji poruku svim igračima. - [OnPlayerText](../callbacks/OnPlayerText): Pozvano kada igrač pošalje poruku putem chata.
openmultiplayer/web/docs/translations/bs/scripting/functions/SendPlayerMessageToAll.md/0
{ "file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/SendPlayerMessageToAll.md", "repo_id": "openmultiplayer", "token_count": 699 }
358
--- title: SetObjectNoCameraCol description: Onemogućite sudare između kamera igrača i navedenog objekta. tags: [] --- :::warning Ova funkcija je dodana u SA-MP 0.3.7 i ne radi u nižim verzijama! ::: ## Deskripcija Onemogućite sudare između kamera igrača i navedenog objekta. | Ime | Deskripcija | | -------- | ------------------------------------------------------ | | objectid | ID objekta za onemogućiti sudare između kamere igrača. | ## Returns 1: Funkcija uspješno izvršena. 0: Funkcija neuspješno izvršena. Navedeni objekat ne postoji. ## Primjeri ```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; } ``` ## Zabilješke :::tip Ovo radi samo izvan granica karte (prošlih -3000/3000 jedinica na x i/ili y osi). ::: ## Srodne Funkcije - [SetPlayerObjectNoCameraCol](SetPlayerObjectNoCameraCol): Onemogućava sudare između kamere i objekta playera.
openmultiplayer/web/docs/translations/bs/scripting/functions/SetObjectNoCameraCol.md/0
{ "file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/SetObjectNoCameraCol.md", "repo_id": "openmultiplayer", "token_count": 521 }
359
--- title: SetPlayerColor description: Postavlja boju igračevog nametag-a i markera/oznake (bljeskalica na mapi/radaru). tags: ["player"] --- ## Deskripcija Postavlja boju igračevog nametag-a i markera/oznake (bljeskalica na mapi/radaru). | Ime | Deskripcija | | -------- | --------------------------------------------- | | playerid | ID igrača za postaviti boju. | | color | Boja za postaviti. Podržava alfa vrijednosti. | ## Returns Ova funkcija ne returna (vraća) nikakve posebne vrijednosti. ## Primjeri ```c // Crvena, koristeći se hexadecimalnom notacijom: SetPlayerColor(playerid, 0xFF0000FF); // Crvena, koristeći se decimalnom notacijom: SetPlayerColor(playerid, 4278190335); ``` ## Zabilješke :::tip Ova funkcija će promijeniti boju igrača za sve, čak i ako je boja igrača promijenjena pomoću SetPlayerMarkerForPlayer za bilo koji drugi igrač. Ako se koristi pod OnPlayerConnect, igrač koji utječe neće vidjeti boju u TAB izborniku. ::: ## Srodne Funkcije - [SetPlayerMarkerForPlayer](SetPlayerMarkerForPlayer): Postavite marker/oznaku igrača. - [GetPlayerColor](GetPlayerColor): Provjeri boju igrača. - [ChangeVehicleColor](ChangeVehicleColor): Postavi boju vozila.
openmultiplayer/web/docs/translations/bs/scripting/functions/SetPlayerColor.md/0
{ "file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/SetPlayerColor.md", "repo_id": "openmultiplayer", "token_count": 548 }
360
--- title: SetPlayerPos description: Postavite poziciju igrača. tags: ["player"] --- ## Deskripcija Postavite poziciju igrača. | Ime | Deskripcija | | -------- | ------------------------------------ | | playerid | ID igrača za postaviti poziciju. | | Float:x | X kordinata za pozicionirati igrača. | | Float:y | Y kordinata za pozicionirati igrača. | | Float:z | Z kordinata za pozicionirati igrača. | ## Returns 1: Funkcija uspješno izvršena. 0: Funkcija neuspješno izvršena. Ovo znači da navedeni igrač ne postoji. ## Primjeri ```c // Teleportuje igrača u centar San Andreasa kada napiše /middle public OnPlayerCommandText(playerid,cmdtext[]) { if (!strcmp(cmdtext, "/middle", true)) { SetPlayerPos(playerid, 0.0, 0.0, 3.0); return 1; } return 0; } ``` ## Zabilješke :::tip Korištenje ove funkcije na igraču koji je u vozilu odmah će ga ukloniti iz vozila. Korisno za brzo izbacivanje igrača. ::: :::tip Kada postavljate položaj igrača u enterijer, mora se postaviti i njegov enterijer. ::: ## Srodne Funkcije - [SetPlayerPosFindZ](SetPlayerPosFindZ): Postavi poziciju igrača i pronađi tlo. - [GetPlayerPos](GetPlayerPos): Dobij poziciju igrača. - [SetVehiclePos](SetVehiclePos): Postavi poziciju vozila. - [GetVehiclePos](GetVehiclePos): Doznajte položaj vozila.
openmultiplayer/web/docs/translations/bs/scripting/functions/SetPlayerPos.md/0
{ "file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/SetPlayerPos.md", "repo_id": "openmultiplayer", "token_count": 629 }
361
--- title: SetVehicleVirtualWorld description: Postavi virtualni svijet ('virtual world') vozila. tags: ["vehicle"] --- ## Deskripcija Postavi virtualni svijet ('virtual world') vozila. Igrači će moći vidjeti samo ona vozila koja su u njihovom virtualnom svijetu. | Ime | Deskripcija | | --------- | ------------------------------------------ | | vehicleid | ID vozila za postaviti virtualni svijet. | | worldid | ID virtualnog svijeta za postaviti vozilu. | ## Returns Ova funkcija ne returna (vraća) nikakve posebne vrijednosti. ## Primjeri ```c SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), 10); SetPlayerVirtualWorld(playerid, 10); ``` ## Srodne Funkcije - [GetVehicleVirtualWorld](GetVehicleVirtualWorld): Provjerite u kojem je virtualnom svijetu vozilo. - [SetPlayerVirtualWorld](SetPlayerVirtualWorld): Postavite virtualni svijet igrača.
openmultiplayer/web/docs/translations/bs/scripting/functions/SetVehicleVirtualWorld.md/0
{ "file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/SetVehicleVirtualWorld.md", "repo_id": "openmultiplayer", "token_count": 348 }
362
--- title: StopRecordingPlayerData description: Zaustavlja sve snimke započete sa StartRecordingPlayerData za određenog igrača. tags: ["player"] --- ## Deskripcija Zaustavlja sve snimke započete sa StartRecordingPlayerData za određenog igrača. | Ime | Deskripcija | | -------- | ---------------------------------------- | | playerid | Igrač za kojeg želite zaustaviti snimke. | ## Returns Ova funkcija ne returna (vraća) nikakve posebne vrijednosti. ## Primjeri ```c public OnPlayerCommandText(playerid, cmdtext[]) { if (!strcmp("/stoprecording", cmdtext)) { StopRecordingPlayerData(playerid); SendClientMessage(playerid, 0xFFFFFFFF, "Snimljena datoteka je spremljena u mapu scriptfiles!"); return 1; } } ``` ## Srodne Funkcije - [StartRecordingPlayerData](StartRecordingPlayerData): Počnite snimati podatke o igraču.
openmultiplayer/web/docs/translations/bs/scripting/functions/StopRecordingPlayerData.md/0
{ "file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/StopRecordingPlayerData.md", "repo_id": "openmultiplayer", "token_count": 381 }
363
--- title: TextDrawSetSelectable description: Postavlja da li se textdraw može selektovati (kliknuti) ili ne. tags: ["textdraw"] --- ## Deskripcija Postavlja da li se textdraw može selektovati (kliknuti) ili ne. | Ime | Deskripcija | |----------|--------------------------------------------------------| | text | ID textdrawa za postaviti da li se može selektovati. | | bool:set | 'true' može se selektovati, ili 'false' da se ne može. | ## Returns Ova funkcija ne returna (vraća) nikakve posebne vrijednosti. ## Primjeri ```c public OnPlayerCommandText(playerid, cmdtext[]) { if (!strcmp(cmdtext, "/selectd", true)) { for (new i = 0; i < MAX_TEXT_DRAWS; i++) { TextDrawSetSelectable(Text:i, true); } SendClientMessage(playerid, 0xFFFFFFAA, "SERVER: Svi textdraw-ovi se sada mogu selektovati!"); return 1; } return 0; } ``` ## Zabilješke :::tip Koristi [TextDrawTextSize](TextDrawTextSize) da definirate klikljivo područje. ::: :::warning TextDrawSetSelectable se mora koristiti PRIJE nego je textdraw prikazan igračima kako bi bio klikljiv (selektabilan). ::: ## Srodne Funkcije - [SelectTextDraw](SelectTextDraw): Omogućava miš kako bi igrač mogao da selektuje textdraw. - [CancelSelectTextDraw](CancelSelectTextDraw): Prekida selekciju textdrawa sa mišem. ## Srodne Callbacks - [OnPlayerClickTextDraw](../callbacks/OnPlayerClickTextDraw): Pozvano kada igrač klikne na textdraw.
openmultiplayer/web/docs/translations/bs/scripting/functions/TextDrawSetSelectable.md/0
{ "file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/TextDrawSetSelectable.md", "repo_id": "openmultiplayer", "token_count": 667 }
364
--- title: VectorSize description: Vraća normu (dužinu) navedenog vektora. tags: [] --- ## Deskripcija Vraća normu (dužinu) navedenog vektora. | Ime | Deskripcija | | ------- | -------------------------- | | Float:X | Veličina vektora na X osi. | | Float:Y | Veličina vektora na Y osi. | | Float:Z | Veličina vektora na Z osi. | ## Returns Norma (dužina) predviđenog vektora kao float. ## Primjeri ```c stock Float:GetDistanceBetweenPoints(Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2) { return VectorSize(x1-x2, y1-y2, z1-z2); } ``` ## Srodne Funkcije - [GetPlayerDistanceFromPoint](GetPlayerDistanceFromPoint): Dobij razmak između igrača i tačke. - [GetVehicleDistanceFromPoint](GetVehicleDistanceFromPoint): Dobij razmak između vozila i tačke. - [floatsqroot](floatsqroot): Izračunajte kvadratni korijen float vrijednosti.
openmultiplayer/web/docs/translations/bs/scripting/functions/VectorSize.md/0
{ "file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/VectorSize.md", "repo_id": "openmultiplayer", "token_count": 390 }
365
--- title: float description: Konvertuje cijeli broj u float. tags: [] --- :::warning Ova funkcija započinje malim slovom. ::: ## Deskripcija Konvertuje cijeli broj u float. | Ime | Deskripcija | | ----- | --------------------------------------------- | | value | Cjelobrojna vrijednost za pretvaranje u float | ## Returns Dati cijeli broj u floatu. ## Primjeri ```c new Float:FloatValue; new Value = 52; FloatValue = float(Value); // Pretvara vrijednost (52) u float i pohranjuje je u 'FloatValue' (52.0) ``` ## Srodne Funkcije - [floatround](floatround): Pretvori float u cijeli broj (zaokruživanje). - [floatstr](floatstr): Konvertuj string u float.
openmultiplayer/web/docs/translations/bs/scripting/functions/float.md/0
{ "file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/float.md", "repo_id": "openmultiplayer", "token_count": 295 }
366
--- title: fmatch description: Pronađite naziv datoteke koji odgovara uzorku. tags: [] --- :::warning Ova funkcija započinje malim slovom. ::: ## Deskripcija Pronađite naziv datoteke koji odgovara uzorku. | Ime | Deskripcija | | ------------- | -------------------------------------------------------------------- | | name | Niz u kojem se nalazi rezultat vraćen je kao spakirani niz. | | const pattern | Uzorak koji bi trebao odgovarati. Može sadržavati zamjenske znakove. | | indeks | Broj datoteke, u slučaju da postoji više podudaranja. | | veličina | Maksimalna veličina imena parametra | ## Returns Tačno(true) na uspjehu, netačno(false) na neuspjehu. ## Zabilješke :::warning Ova funkcija ne radi u trenutnoj verziji SA:MP-a! ::: ## 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/fmatch.md/0
{ "file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/fmatch.md", "repo_id": "openmultiplayer", "token_count": 823 }
367
--- title: Funkcije skriptiranja sidebar_label: Funkcije skriptiranja --- za sada glupa stranica, preusmjerava na prvu funkciju
openmultiplayer/web/docs/translations/bs/scripting/functions/index.md/0
{ "file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/index.md", "repo_id": "openmultiplayer", "token_count": 52 }
368
--- title: strdel description: Obriši dio stringa. tags: [] --- :::warning Ova funkcija započinje malim slovom. ::: ## Deskripcija Obriši dio stringa. | Ime | Deskripcija | | -------- | -------------------------------------------- | | string[] | Stringa za izbrisati njegov dio. | | start | Pozicija prvog karaktera za izbrisati. | | end | Pozicija posljednjeg karaktera za izbrisati. | ## Returns Ova funkcija ne returna (vraća) nikakve posebne vrijednosti. ## Primjeri ```c new string[42] = "We will delete everything apart from this"; // izbrisati ćemo sve osim 'this' strdel(string, 0, 37); // string je sada "this" ``` ## Srodne Funkcije - [strcmp](strcmp): Uporedi dva stringa kako bi provjerio da li su isti. - [strfind](strfind): Pretraži string u drugom stringu. - [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. - [strcat](strcat): Spojite dva stringa u odredišnu referencu.
openmultiplayer/web/docs/translations/bs/scripting/functions/strdel.md/0
{ "file_path": "openmultiplayer/web/docs/translations/bs/scripting/functions/strdel.md", "repo_id": "openmultiplayer", "token_count": 503 }
369
--- title: Dijelovi tijela --- :::info Sljedeći unosi su ID-ovi dijelova tijela koje mogu koristiti [OnPlayerGiveDamage](../callbacks/OnPlayerGiveDamage), [OnPlayerTakeDamage](../callbacks/OnPlayerTakeDamage) i [OnPlayerGiveDamageActor](../callbacks/OnPlayerGiveDamageActor). ::: --- | ID | Dio Tijela | | --- | ----------- | | 3 | Torzo | | 4 | Prepone | | 5 | Lijeva ruka | | 6 | Desna ruka | | 7 | Lijeva noga | | 8 | Desna noga | | 9 | Glava | --- :::note Ovi ID-ovi nisu 100% potvrđeni i nisu definirani ni u jednom SA-MP include-u - mora ih definirati skripter. Nepoznato je da li ID-ovi 0, 1 i 2 imaju ikakve koristi. ::: ![](/images/bodyParts/Body_parts.jpg)
openmultiplayer/web/docs/translations/bs/scripting/resources/bodyparts.md/0
{ "file_path": "openmultiplayer/web/docs/translations/bs/scripting/resources/bodyparts.md", "repo_id": "openmultiplayer", "token_count": 315 }
370
--- title: OnClientCheckResponse description: Dieses Callback wird ausgeführt wenn ein SendClientCheck Request abgeschlossen ist. tags: [] --- ## Beschreibung Dieses Callback wird ausgeführt wenn ein SendClientCheck Request abgeschlossen ist. | Name | Beschreibung | | ------------- | --------------------------------- | | playerid | Die ID des Spielers, der geprüft wurde. | | actionid | Der Check Typ der geprüft wurde. | | memaddr | Die angefragte Adresse. | | retndata | Das Ergebnis des Checks. | ## Rückgabe (return value) Wird in Filterscripts immer zuerst aufgerufen. ## Beispiele ```c public OnPlayerConnect(playerid) { SendClientCheck(playerid, 0x48, 0, 0, 2); return 1; } public OnClientCheckResponse(playerid, actionid, memaddr, retndata) { if(actionid == 0x48) // or 72 { print("WARNUNG: Der Spieler scheint keinen stanrdmäßigen Computer zu nutzen!"); Kick(playerid); } return 1; } ``` ## Anmerkungen :::warning Dieses Callback wird nur in Filterscripts aufgerufen. ::: ## Ähnliche Funktionen - [SendClientCheck](../functions/SendClientCheck): Eine Memory-Überprüfung für einen Spieler durchführen.
openmultiplayer/web/docs/translations/de/scripting/callbacks/OnClientCheckResponse.md/0
{ "file_path": "openmultiplayer/web/docs/translations/de/scripting/callbacks/OnClientCheckResponse.md", "repo_id": "openmultiplayer", "token_count": 544 }
371
--- title: Contribuye description: Cómo contribuir a la Wiki de SA-MP y a la documentación de open.mp. --- El código fuente de esta documentación está abierto para que cualquiera pueda aportar cambios. Todo lo que necesitas es una cuenta de [GitHub](https://github.com) y algo de tiempo libre. Ni siquiera necesitas saber Git, ¡puedes hacerlo todo desde la interfaz web! Si quieres ayudar a mantener un idioma específico, abre un PR contra el archivo [`CODEOWNERS`](https://github.com/openmultiplayer/web/blob/master/CODEOWNERS) y añade una línea para el directorio de tu idioma con tu nombre de usuario. ## Edición de contenidos En cada página, hay un botón que te lleva a la página de GitHub para editar: ![Edit this page link present on each wiki page](images/contributing/edit-this-page.png) Por ejemplo, haciendo clic en [SetVehicleAngularVelocity](../scripting/functions/SetVehicleAngularVelocity) te lleva a [esta pagina](https://github.com/openmultiplayer/web/blob/master/docs/scripting/functions/SetVehicleAngularVelocity.md) que te presenta un editor de texto para hacer cambios en el archivo (suponiendo que has iniciado sesión en GitHub). Realice su edición y envíe una "Pull Request", lo que significa que los mantenedores de la Wiki y otros miembros de la comunidad pueden revisar su cambio, discutir si necesita cambios adicionales y luego fusionarlo. ## Añadir nuevos contenidos Añadir nuevos contenidos es un poco más complicado. Puede hacerlo de dos maneras: ### Interfaz de GitHub Al navegar por un directorio en GitHub, hay un botón `Add file` en la esquina superior derecha de la lista de archivos: ![Add file button](images/contributing/add-new-file.png) Puedes subir un archivo Markdown que ya hayas escrito o escribirlo directamente en el editor de texto de GitHub. El archivo _debe_ tener una extensión `.md` y contener Markdown. Para más información sobre Markdown, consulte [esta guía](https://guides.github.com/features/mastering-markdown/). Una vez hecho esto, pulsa `Proponer nuevo archivo` y se abrirá una Pull Request para su revisión. ### Git Si desea utilizar Git, todo lo que necesita hacer es clonar el repositorio Wiki con: ```sh git clone https://github.com/openmultiplayer/wiki.git ``` Ábrelo en tu editor favorito. Recomiendo Visual Studio Code, ya que dispone de excelentes herramientas para editar y dar formato a los archivos Markdown. Como puedes ver, ¡estoy escribiendo esto con Visual Studio Code! ![Visual Studio Code markdown preview](images/contributing/vscode.png) Te recomiendo dos extensiones para mejorar tu experiencia: - [markdownlint](https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint) de David Anson - se trata de una extensión que se asegura de que tu Markdown está formateado correctamente. Evita algunos errores sintácticos y semánticos. No todas las advertencias son importantes, pero algunas pueden ayudar a mejorar la legibilidad. Utilice su mejor criterio y, en caso de duda, pregunte a un revisor. - [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) del equipo Prettier.js - es un formateador que formateará automáticamente tus archivos Markdown para que todos usen un estilo consistente. El repositorio Wiki tiene algunos ajustes en su `package.json` que la extensión debería usar automáticamente. Asegúrate de activar "Format On Save" en la configuración de tu editor para que tus archivos Markdown se formateen automáticamente cada vez que los guardes. ## Notas, consejos y convenciones ### Enlaces internos No utilice URL absolutas para los enlaces entre sitios. Utilice rutas relativas. - ❌ ```md Para su uso con [OnPlayerClickPlayer](https://www.open.mp/docs/scripting/callbacks/OnPlayerClickPlayer) ``` - ✔ ```md Para su uso con [OnPlayerClickPlayer](../callbacks/OnPlayerClickPlayer) ``` `../` significa "subir un directorio", así que si el archivo que estás editando está dentro del directorio `functions` y estás enlazando a `callbacks`, usa `../` para subir a `scripting/`, luego `callbacks/` para entrar en el directorio `callbacks`, luego el nombre del archivo (sin `md`) del callback que quieres enlazar. ### Imagenes Las imágenes van dentro de un subdirectorio dentro de `/static/images`. Entonces cuando enlazas una imagen en un `![]()` sólo tienes que usar `/images/` como ruta base (no necesitas `static` que es sólo para el repositorio). Si tienes dudas, lee otra página que utilice imágenes y copia cómo se hace allí. ### Metadata Lo primero en _cualquier_ documento deben ser los metadatos: ```mdx --- title: Mi Documentacion description: Esta es una página sobre cosas y hamburguesas, ¡viva! --- ``` Cada página debe incluir un título y una descripción. Para obtener una lista completa de lo que puede ir entre el `---`, consulte [la documentación de Docusaurus](https://v2.docusaurus.io/docs/markdown-features#markdown-headers). ### Encabezado No cree un encabezamiento de nivel 1 (`<h1>`) con `#`, ya que se genera automáticamente. El primer título debe ser siempre `##`. - ❌ ```md # My Titulo Esta es la documentación para ... # Sub-sección ``` - ✔ ```md Esta es la documentación para ... ## Sub-sección ``` ### Use `Code` Snippets For Technical References Cuando escribas un párrafo que contenga nombres de funciones, números, expresiones o cualquier cosa que no sea lenguaje escrito estándar, rodéalos con \`puntos y comas\`. Así es más fácil separar el lenguaje para describir cosas de las referencias a elementos técnicos como nombres de funciones y trozos de código. - ❌ > La función fopen devolverá un valor con una etiqueta de tipo File:, no hay ningún problema en esa línea ya que el valor devuelto está siendo almacenado en una variable también con una etiqueta de File: (nótese que los casos son los mismos también). Sin embargo, en la siguiente línea se añade el valor 4 al manejador de fichero. 4 no tiene etiqueta [...] - ✔ > La función `fopen` devolverá un valor con una etiqueta de tipo `File:`, no hay ningún problema en esa línea ya que el valor devuelto está siendo almacenado en una variable también con una etiqueta de `File:` (nótese que los casos son los mismos también). Sin embargo, en la siguiente línea se añade el valor `4` al manejador del fichero. `4` no tiene etiqueta En el ejemplo anterior, `fopen` es un nombre de función, no una palabra inglesa, por lo que rodearlo de marcadores de fragmentos de código `code` ayuda a distinguirlo del resto del contenido. Además, si el párrafo hace referencia a un bloque de código de ejemplo, esto ayuda al lector a asociar las palabras con el ejemplo. ### Tablas Si una tabla tiene títulos, éstos van en la parte superior: - ❌ ```md | | | | ------- | ------------------------------------ | | Health | Engine Status | | 650 | Undamaged | | 650-550 | White Smoke | | 550-390 | Grey Smoke | | 390-250 | Black Smoke | | < 250 | On fire (will explode seconds later) | ``` - ✔ ```md | Health | Engine Status | | ------- | ------------------------------------ | | 650 | Undamaged | | 650-550 | White Smoke | | 550-390 | Grey Smoke | | 390-250 | Black Smoke | | < 250 | On fire (will explode seconds later) | ``` ## Migración desde SA-MP Wiki La mayor parte del contenido se ha trasladado, pero si encuentras una página que falta, aquí tienes una breve guía para convertir el contenido a Markdown. ### Obtener el HTML 1. Pulse este botón (Firefox) ![image](images/contributing/04f024579f8d.png) (Chrome) ![image](images/contributing/f62bb8112543.png) 2. Pase el ratón por la parte superior izquierda de la página principal de la wiki, en el margen izquierdo o en la esquina hasta que vea `#content` ![image](images/contributing/65761ffbc429.png) O busque `<div id=content>` ![image](images/contributing/77befe2749fd.png) 3. Copia el HTML interno de ese elemento ![image](images/contributing/8c7c75cfabad.png) Ahora tienes _sólo_ el código HTML para el _contenido_ real de la página, lo que nos importa, y puedes convertirlo a Markdown. ### Convertir HTML a Markdown Para convertir HTML básico (sin tablas) a Markdown utilice: https://domchristie.github.io/turndown/ ![image](images/contributing/77f4ea555bbb.png) ^^ Fíjate que ahora se ha deshecho la tabla por completo... ### Tablas HTML a tablas Markdown Dado que la herramienta anterior no admite tablas, utilice esta herramienta: https://jmalarcon.github.io/markdowntables/ Y copia sólo el elemento `<table>`: ![image](images/contributing/57f171ae0da7.png) ### Limpiando Es probable que la conversión no sea perfecta. Así que tendrás que hacer un poco de limpieza manual. Las extensiones de formato enumeradas anteriormente deberían ayudar con eso, pero aún así puede que tenga que pasar algún tiempo haciendo el trabajo manual. Si no tienes tiempo, ¡no te preocupes! Envía un borrador inacabado y otra persona podrá retomarlo donde tú lo dejaste. ## Acuerdo de licencia Todos los proyectos de open.mp tienen un [Acuerdo de Licencia del Colaborador](https://cla-assistant.io/openmultiplayer/homepage). Esto básicamente significa que aceptas que usemos tu trabajo, y que lo pongamos bajo una licencia de código abierto. Cuando abres un Pull Request por primera vez, el bot CLA-Assistant publicará un enlace donde puedes firmar el acuerdo.
openmultiplayer/web/docs/translations/es/docs/meta/Contribuye.md/0
{ "file_path": "openmultiplayer/web/docs/translations/es/docs/meta/Contribuye.md", "repo_id": "openmultiplayer", "token_count": 3750 }
372
--- título: OnPlayerClickPlayer descripción: Se llama cuando un jugador hace doble click a un jugador en el scoreboard (menú TAB). tags: ["player"] --- ## Descripción Se llama cuando un jugador hace doble click a un jugador en el scoreboard (menú TAB). | Nombre | Descripción | | --------------- | ---------------------------------------------------------------- | | playerid | El ID del jugador que clickeó a otro jugador en el scoreboard. | | clickedplayerid | El ID del jugador que fue clickeado en el scoreboard. | | source | El origen del click del jugador (ver notas abajo). | ## 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 OnPlayerClickPlayer(playerid, clickedplayerid, CLICK_SOURCE:source) { new message[32]; format(message, sizeof(message), "Clickeaste en el jugador %d", clickedplayerid); SendClientMessage(playerid, 0xFFFFFFFF, message); return 1; } ``` ## Notas :::tip Actualmente hay un solo origen/source (0 - CLICK_SOURCE_SCOREBOARD). La existencia de este argumento sugiere que más origenes pueden ser soportados en el futuro. ::: ## Funciones Relacionadas - [OnPlayerClickTextDraw](OnPlayerClickTextDraw): Se llama cuando un jugador clickea en un textdraw.
openmultiplayer/web/docs/translations/es/scripting/callbacks/OnPlayerClickPlayer.md/0
{ "file_path": "openmultiplayer/web/docs/translations/es/scripting/callbacks/OnPlayerClickPlayer.md", "repo_id": "openmultiplayer", "token_count": 554 }
373
--- título: OnPlayerGiveDamageActor descripción: Este callback se llama cuando un jugador le hace daño a un actor. tags: ["player"] --- <VersionWarnES name='callback' version='SA-MP 0.3.7' /> ## Descripción Este callback se llama cuando un jugador le hace daño a un actor. | Nombre | Descripción | |-----------------|---------------------------------------------------------| | playerid | El ID del jugador que hizo daño. | | damaged_actorid | El ID del actor que recibió daño. | | Float:amount | La cantidad de vida/chaleco que damaged_actorid perdió. | | WEAPON:weaponid | La razón que causó el daño. | | bodypart | La parte del cuerpo que fue golpeada. | ## 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 OnPlayerGiveDamageActor(playerid, damaged_actorid, Float:amount, WEAPON:weaponid, bodypart) { new string[128], attacker[MAX_PLAYER_NAME]; new weaponname[24]; GetPlayerName(playerid, attacker, sizeof (attacker)); GetWeaponName(weaponid, weaponname, sizeof (weaponname)); format(string, sizeof(string), "%s le hizo %.0f de daño al actor id %d, arma: %s", attacker, amount, damaged_actorid, weaponname); SendClientMessageToAll(0xFFFFFFFF, string); return 1; } ``` ## Notas :::tip Esta función no es llamada cuando el actor es establecido invulnerable (QUE ASÍ SE ESTABLECE POR DEFECTO). Vea [SetActorInvulnerable](../functions/SetActorInvulnerable). ::: ## Funciones Relacionadas - [CreateActor](../functions/CreateActor): Crear un actor (NPC estático). - [SetActorInvulnerable](../functions/SetActorInvulnerable): Establecer invulnerable al actor. - [SetActorHealth](../functions/SetActorHealth): Establecer la salud de un actor. - [GetActorHealth](../functions/GetActorHealth): Conseguir la salud de un actor. - [IsActorInvulnerable](../functions/IsActorInvulnerable): Comprobar si el actor es invulnerable. - [IsValidActor](../functions/IsValidActor): Comprobar si el ID del actor es válida. ## Callbacks Relacionadas - [OnActorStreamOut](OnActorStreamOut): Se llama cuando un actor es dejado de cargar por el cliente de un jugador. - [OnPlayerStreamIn](OnPlayerStreamIn): Se llama cuando un jugador se comienza a cargar por el cliente de otro jugador.
openmultiplayer/web/docs/translations/es/scripting/callbacks/OnPlayerGiveDamageActor.md/0
{ "file_path": "openmultiplayer/web/docs/translations/es/scripting/callbacks/OnPlayerGiveDamageActor.md", "repo_id": "openmultiplayer", "token_count": 953 }
374
--- título: OnPlayerTakeDamage descripción: Este callback se llama cuando un jugador sufre daño. tags: ["player"] --- ## Descripción Este callback se llama cuando un jugador sufre daño. | Nombre | Descripción | |-----------------|-------------------------------------------------------------------------------------------------------------------------| | playerid | El ID del jugador que sufrió daño. | | issuerid | El ID del jugador que causó el daño. O INVALID_PLAYER_ID si fue él mismo. | | Float:amount | La cantidad de daño que sufrió el jugador (salud y chaleco combinados). | | WEAPON:weaponid | El ID del arma/origen del daño. | | bodypart | La parte del cuerpo del impacto. | ## 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 OnPlayerTakeDamage(playerid, issuerid, Float:amount, WEAPON:weaponid, bodypart) { if (issuerid != INVALID_PLAYER_ID) // Si no fue causado por él mismo { new infoString[128], weaponName[24], victimName[MAX_PLAYER_NAME], attackerName[MAX_PLAYER_NAME]; GetPlayerName(playerid, victimName, sizeof (victimName)); GetPlayerName(issuerid, attackerName, sizeof (attackerName)); GetWeaponName(weaponid, weaponName, sizeof (weaponName)); format(infoString, sizeof(infoString), "%s le hizo %.0f de daño a %s, arma: %s, parte del cuerpo: %d", attackerName, amount, victimName, weaponName, bodypart); SendClientMessageToAll(-1, infoString); } return 1; } public OnPlayerTakeDamage(playerid, issuerid, Float:amount, WEAPON:weaponid, bodypart) { if (issuerid != INVALID_PLAYER_ID && weaponid == 34 && bodypart == 9) { // Un disparo en la cabeza con sniper matará instantáneamente al jugador SetPlayerHealth(playerid, 0.0); } return 1; } ``` ## Notas :::tip El 'weaponid' va a retornar 37 (lanzallamas) de cualquier origen de fuego (ej. molotov, 18), 'weaponid' retornará 51 ante cualquier arma que cree una explosión (ej. lanzamisiles, granada). playerid es el único que puede llamar este callback. La cantidad de daño es siempre el daño máximo que el weaponid puede hacer, incluso cuando la vida restante es menor que el daño máximo de esta. Entonces cuando un jugador tiene 100.0 de salud y recibe un tiro con una Desert Eagle que tiene un valor de daño de 46.2, tomará 3 disparos para matar a ese jugador. Los 3 disparos mostrarán una cantidad de daño de 46.2 sin importar que cuando el último disparo impacta, el jugador tiene sólo 7.6 de salud restante. ::: :::warning GetPlayerHealth y GetPlayerArmour retornará los valores antiguos antes de este callback. Siempre comprobar si 'issuerid' es válido antes de usarlo en un array. :::
openmultiplayer/web/docs/translations/es/scripting/callbacks/OnPlayerTakeDamage.md/0
{ "file_path": "openmultiplayer/web/docs/translations/es/scripting/callbacks/OnPlayerTakeDamage.md", "repo_id": "openmultiplayer", "token_count": 1478 }
375
--- título: OnVehicleStreamIn descripción: Se llama cuando un vehículo es cargado (se hace visible) en el cliente de un jugador. tags: ["vehicle"] --- ## Descripción Se llama cuando un vehículo es cargado (se hace visible) en el cliente de un jugador. | Nombre | Descripción | | ----------- | ------------------------------------------------------ | | vehicleid | El ID del vehículo que fue cargado para el jugador. | | forplayerid | El ID del jugador por el que se cargó el vehículo. | ## Devoluciones Siempre se llama primero en filterscripts. ## Ejemplos ```c public OnVehicleStreamIn(vehicleid, forplayerid) { new string[32]; format(string, sizeof(string), "Ahora podés ver el vehículo %d.", vehicleid); SendClientMessage(forplayerid, 0xFFFFFFFF, string); return 1; } ``` ## Notas <TipNPCCallbacksES /> ## Funciones Relacionadas
openmultiplayer/web/docs/translations/es/scripting/callbacks/OnVehicleStreamIn.md/0
{ "file_path": "openmultiplayer/web/docs/translations/es/scripting/callbacks/OnVehicleStreamIn.md", "repo_id": "openmultiplayer", "token_count": 368 }
376
--- title: GivePlayerMoney description: به یک بازیکن مشخص شده پول بدهید یا از او پول بگیرید --- ## توضیحات | اسم | توضیحات | | -------------| ------------------------------- | | playerid | شناسه بازیکنی میخواهید به ان پول دهید و یا از ان پول بگیرید | | money | مقدار پولی که میخواهید به بازیکن بدهید و برای گرفتن پول از منها استفاده کنید | ## مقادیر برگشتی 1: تابع با موفقیت اجرا شد 0: تابع اجرا نشد. چون متاسفانه بازیکن متصل نیست ## مثال ها </div> ```c public OnPlayerDeath(playerid, killerid, WEAPON:reason) { if (killerid != INVALID_PLAYER_ID) { // درصورتی که یک بازیکن , یک بازیکن دیگه را بکشد $1000 پول خواهد داد GivePlayerMoney(killerid, 1000); SendClientMessage(killerid, -1, "You have been awarded $1000 for the kill."); } // در صورتی که پلیر بمیره 500$ ازش گرفته میشه GivePlayerMoney(playerid, -500); } ``` <div dir="rtl" style={{ textAlign: "right" }}> ## تابع های مرتبط - [ResetPlayerMoney](../callbacks/ResetPlayerMoney) تنظیم کردن پول بازیکن به $0 - [GetPlayerMoney](../callbacks/GetPlayerMoney) بررسی کردن مقدار پول یک بازیکن
openmultiplayer/web/docs/translations/fa/scripting/functions/GivePlayerMoney.md/0
{ "file_path": "openmultiplayer/web/docs/translations/fa/scripting/functions/GivePlayerMoney.md", "repo_id": "openmultiplayer", "token_count": 857 }
377
--- title: OnClientMessage description: This callback gets called whenever the NPC sees a ClientMessage. tags: [] --- ## Deskripsyon Ang callback na ito ay na tatawag kapag ang NPC ay nakakita ng ClientMessage. Eto ay mangyayari lagi kapag nagamitan ng SendClientMessageToAll na function at SendClientMessage na function papunta sa NPC. Ang callback na ito ay hindi matatawag kapag may sinabi ang isang player. Para sa version nito sa OnPlayerText gamitin ang NPC:OnPlayerText. | Pangalan | Deskripsyon | | -------- | ------------------------------- | | color | Ang color ng ClientMessage. | | text[] | Ang mismong message. | ## Returns Hindi nag rereturn ang callback na ito. ## Mga Halimbawa ```c public OnClientMessage(color, text[]) { if (strfind(text,"Bank Balance: $0") != -1) { SendClientMessage(playerid, -1, "I am poor :("); } } ``` ## Mga Related na Callbacks
openmultiplayer/web/docs/translations/fil/scripting/callbacks/OnClientMessage.md/0
{ "file_path": "openmultiplayer/web/docs/translations/fil/scripting/callbacks/OnClientMessage.md", "repo_id": "openmultiplayer", "token_count": 339 }
378
--- title: OnPlayerClickMap description: OnPlayerClickMap is called when a player places a target/waypoint on the pause menu map (by right-clicking). tags: ["player"] --- ## Description Ang OnPlayerClickMap ay itinatawag kapag ang player ay naglagay ng isang target o waypoint sa kanyang pause menu map. (Sa pag right-click) | Name | Description | | -------- | ----------------------------------------------------------------------------------- | | playerid | Ang ID ng player na naglagay ng target o waypoint | | Float:fX | Ang X float coordinate kung saan pumindot ang player. | | Float:fY | Ang Y float coordinate kung saan pumindot ang player. | | Float:fZ | Ang Z float coordinate kung saan pumindot ang player. (inaccurate - see note below) | ## Returns 1 - Pinipigilan ang ibang filterscript na tanggapin itong callback. 0 - Ipinapahiwatig na ang callback na ito ay ipapasa sa ibang filterscript. Ito ay palaging itinatawag una sa mga gamemode. ## Examples ```c public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ) { SetPlayerPosFindZ(playerid, fX, fY, fZ); return 1; } ``` ## Mga Dapat Unawain :::tip Sabi nga sa pangalan ng callback, ito ay itinatawag lang kapag ang player ay nag right click upang mag mark sa kanilang mapa, at hindi sa pagpindot ng key. Ang Z value na irereturn ay magiging 0 (invalid) kapag ang area na ipinindot ng player ay malayo sa kanila; gamitin ang MapAndreas o ColAndreas na plugin upang makakuha ng mas tumpak na Z coordinate. ::: ## Mga Kaugnay na Functions
openmultiplayer/web/docs/translations/fil/scripting/callbacks/OnPlayerClickMap.md/0
{ "file_path": "openmultiplayer/web/docs/translations/fil/scripting/callbacks/OnPlayerClickMap.md", "repo_id": "openmultiplayer", "token_count": 669 }
379
--- title: OnVehicleStreamOut description: Tinatawag ang callback na ito kapag na-stream out ang isang sasakyan para sa client ng player (napakalayo nito kaya hindi nila ito nakikita). tags: ["vehicle"] --- ## Description Tinatawag ang callback na ito kapag na-stream out ang isang sasakyan para sa client ng player (napakalayo nito kaya hindi nila ito nakikita). | Name | Description | | ----------- | ------------------------------------------------------------ | | vehicleid | Ang ID ng sasakyan na nag-stream out. | | forplayerid | Ang ID ng player na hindi na nag i-stream ng sasakyan. | ## Returns Palaging una itong tinatawag sa mga filterscript. ## Examples ```c public OnVehicleStreamOut(vehicleid, forplayerid) { new string[48]; format(string, sizeof(string), "Your client is no longer streaming vehicle %d", vehicleid); SendClientMessage(forplayerid, 0xFFFFFFFF, string); return 1; } ``` ## Notes <TipNPCCallbacks /> ## Related Callbacks - [OnVehicleStreamIn](OnVehicleStreamIn): Tinatawag ang callback na ito kapag nag-stream ang sasakyan para sa isang player. - [OnPlayerStreamIn](OnPlayerStreamIn): Tinatawag ang callback na ito kapag nag-stream ang isang player para sa isa pang player. - [OnPlayerStreamOut](OnPlayerStreamOut): Tinatawag ang callback na ito kapag nag-stream out ang isang player para sa isa pang player.
openmultiplayer/web/docs/translations/fil/scripting/callbacks/OnVehicleStreamOut.md/0
{ "file_path": "openmultiplayer/web/docs/translations/fil/scripting/callbacks/OnVehicleStreamOut.md", "repo_id": "openmultiplayer", "token_count": 536 }
380
--- title: Attach3DTextLabelToPlayer description: Mag-attach ng 3D text label sa isang player. tags: ["player", "3dtextlabel"] --- ## Description Mag-attach ng 3D text label sa isang player. | Name | Description | | --------- | --------------------------------------------------------------------- | | Text3D:textid | Ang ID ng 3D text label na isasama. Ibinalik ng Create3DTextLabel. | | playerid | Ang ID ng player kung saan kalakip ang label. | | OffsetX | Ang X offset mula sa player. | | OffsetY | Ang Y offset mula sa player. | | OffsetZ | Ang Z offset mula sa player. | ## Returns 1: Matagumpay na naisakatuparan ang function. 0: Nabigo ang function na isagawa. Nangangahulugan ito na ang player at/o label ay wala. ## Examples ```c public OnPlayerConnect(playerid) { new Text3D:textLabel = Create3DTextLabel("Hello, I am new here!", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0); Attach3DTextLabelToPlayer(textLabel, playerid, 0.0, 0.0, 0.7); return 1; } ``` ## Related Functions - [Create3DTextLabel](Create3DTextLabel): Gumawa ng 3D text label. - [Delete3DTextLabel](Delete3DTextLabel): Magtanggal ng 3D text label. - [Attach3DTextLabelToVehicle](Attach3DTextLabelToVehicle): Maglakip ng 3D text label sa isang sasakyan. - [Update3DTextLabelText](Update3DTextLabelText): Baguhin ang text ng isang 3D text label. - [CreatePlayer3DTextLabel](CreatePlayer3DTextLabel): Gumawa ng 3D text label para sa isang player. - [DeletePlayer3DTextLabel](DeletePlayer3DTextLabel): Tanggalin ang 3D text label ng player. - [UpdatePlayer3DTextLabelText](UpdatePlayer3DTextLabelText): Baguhin ang text ng 3D text label ng player.
openmultiplayer/web/docs/translations/fil/scripting/functions/Attach3DTextLabelToPlayer.md/0
{ "file_path": "openmultiplayer/web/docs/translations/fil/scripting/functions/Attach3DTextLabelToPlayer.md", "repo_id": "openmultiplayer", "token_count": 773 }
381
--- title: EnableStuntBonusForAll description: Pinapagana o hindi pinapagana ang mga stunt bonus para sa lahat ng manlalaro. tags: [] --- ## Description Pinapagana o hindi pinapagana ang mga stunt bonus para sa lahat ng manlalaro. Kung naka-enable, makakatanggap ang mga manlalaro ng monetary reward kapag nagsasagawa ng stunt sa isang sasakyan (hal. wheelie). | Name | Description | | ------ | ----------------------------------------------- | | enable | 1 para paganahin ang mga stunt bonus o 0 para i-disable ang mga ito. | ## Returns Ang function na ito ay hindi nagbabalik ng anumang value. ## Examples ```c public OnGameModeInit() { EnableStuntBonusForAll(0); return 1; } ``` ## Related Functions - [EnableStuntBonusForPlayer](EnableStuntBonusForPlayer): I-toggle ang mga stunt bonus para sa isang player.
openmultiplayer/web/docs/translations/fil/scripting/functions/EnableStuntBonusForAll.md/0
{ "file_path": "openmultiplayer/web/docs/translations/fil/scripting/functions/EnableStuntBonusForAll.md", "repo_id": "openmultiplayer", "token_count": 308 }
382
--- title: IsPlayerAdmin description: Suriin kung ang isang manlalaro ay naka-log in bilang isang RCON admin. tags: ["administration"] --- ## Description Suriin kung ang isang manlalaro ay naka-log in bilang isang RCON admin. | Name | Description | | -------- | ------------------------------ | | playerid | Ang ID ng player na susuriin | ## Returns 1: Ang player ay isang RCON admin. 0: Ang manlalaro ay HINDI isang RCON admin. ## Examples ```c public OnPlayerSpawn(playerid) { if (IsPlayerAdmin(playerid)) { SendClientMessageToAll(0xDEEE20FF, "An admin spawned."); } return 1; } ``` ## Related Functions - [SendRconCommand](SendRconCommand): Nagpapadala ng RCON command sa pamamagitan ng script. ## Related Callbacks - [OnRconLoginAttempt](../callbacks/OnRconLoginAttempt): Tinatawag kapag may ginawang pagtatangkang mag-log in sa RCON.
openmultiplayer/web/docs/translations/fil/scripting/functions/IsPlayerAdmin.md/0
{ "file_path": "openmultiplayer/web/docs/translations/fil/scripting/functions/IsPlayerAdmin.md", "repo_id": "openmultiplayer", "token_count": 336 }
383
--- title: SetVehicleParamsCarDoors description: Binibigyang-daan kang buksan at isara ang mga pinto ng isang sasakyan. tags: ["vehicle"] --- <VersionWarn version='SA-MP 0.3.7' /> ## Description Binibigyang-daan kang buksan at isara ang mga pinto ng isang sasakyan. | Name | Description | | --------- | ----------------------------------------------------------------------- | | vehicleid | Ang ID ng sasakyan upang itakda ang state ng pinto. | | driver | Ang state ng pinto ng driver. 1 para buksan, 0 para isara | | passenger | Ang state ng pintuan ng pasahero. 1 para buksan, 0 para isara. | | backleft | Ang state ng likurang kaliwang pinto (kung magagamit). 1 para buksan, 0 para isara.| | backright | Ang state ng likurang kanang pinto (kung magagamit). 1 para buksan, 0 para isara.| ## Returns [edit] ## Related Functions - [GetVehicleParamsCarDoors](GetVehicleParamsCarDoors): Kunin ang kasalukuyang state ng mga pinto ng sasakyan. - [SetVehicleParamsCarWindows](SetVehicleParamsCarWindows): Buksan at isara ang mga bintana ng sasakyan. - [GetVehicleParamsCarWindows](GetVehicleParamsCarWindows): Kunin ang kasalukuyang state ng mga bintana ng sasakyan
openmultiplayer/web/docs/translations/fil/scripting/functions/SetVehicleParamsCarDoors.md/0
{ "file_path": "openmultiplayer/web/docs/translations/fil/scripting/functions/SetVehicleParamsCarDoors.md", "repo_id": "openmultiplayer", "token_count": 509 }
384
--- title: floatpower description: Itinataas ang ibinigay na halaga sa kapangyarihan ng exponent. tags: ["math", "floating-point"] --- <LowercaseNote /> ## Description Itinataas ang ibinigay na halaga sa kapangyarihan ng exponent. | Name | Description | | -------- | ------------------------------------------------------------------------- | | value | Ang halaga na itataas sa isang power, bilang isang floating-point na numero. | | exponent | Ang exponent ay isa ring floating-point na numero. Maaaring ito ay zero o negatibo. | ## Returns Ang resulta ng 'value' sa power ng 'exponent'. ## Examples ```c printf("2 to the power of 8 is %f", floatpower(2.0, 8.0)); // Result: 256.0 ``` ## Related Functions - [floatsqroot](floatsqroot): Kalkulahin ang square root ng isang floating point value. - [floatlog](floatlog): Kunin ang logarithm ng float value.
openmultiplayer/web/docs/translations/fil/scripting/functions/floatpower.md/0
{ "file_path": "openmultiplayer/web/docs/translations/fil/scripting/functions/floatpower.md", "repo_id": "openmultiplayer", "token_count": 338 }
385
--- title: OnActorStreamOut description: Cette fonction est appelée quand un actor est déchargé (n'est plus visible) pour un joueur. tags: [actors, actorstream, forplayerid, actorid] --- <VersionWarn name='callback' version='SA-MP 0.3.7' /> ## Description Cette fonction est appelée quand un actor est déchargé _(n'est plus visible)_ pour un joueur. | Nom | Description | | ----------- | -------------------------------------------- | | `int` actorid | ID de l'actor déchargé par le joueur | | `int` forplayerid | ID du joueur a déchargé l'actor (`actorid`) | ## Valeur de retour Cette callback ne retourne rien, mais doit retourner quelque chose. Autrement dit, `return callback();` ne fonctionnera pas car la callback ne retourne rien, mais un return _(`return 1;` ou `return 0;`)_ doit être effectué dans la callback. ## Exemple ```c public OnActorStreamOut(actorid, forplayerid) { new string[40]; format(string, sizeof(string), "L'acteur %d n'est plus stream par vous.", actorid); SendClientMessage(forplayerid, 0xFFFFFFFF, string); return 1; } ``` ## Astuces <TipNPCCallbacks /> ## Fonctions connexes
openmultiplayer/web/docs/translations/fr/scripting/Callbacks/OnActorStreamOut.md/0
{ "file_path": "openmultiplayer/web/docs/translations/fr/scripting/Callbacks/OnActorStreamOut.md", "repo_id": "openmultiplayer", "token_count": 466 }
386
--- title: OnNPCSpawn description: Ce rappel est appelé lorsqu'un PNJ apparaît. tags: ["npc"] --- ## Description Ce rappel est appelé lorsqu'un PNJ apparaît. ## Exemples ```c public OnNPCSpawn() { print("PNJ apparu"); SendChat("Bonjour tout le monde. Je suis un bot."); return 1; } ```
openmultiplayer/web/docs/translations/fr/scripting/Callbacks/OnNPCSpawn.md/0
{ "file_path": "openmultiplayer/web/docs/translations/fr/scripting/Callbacks/OnNPCSpawn.md", "repo_id": "openmultiplayer", "token_count": 132 }
387
--- title: OnPlayerEnterGangZone description: Ce rappel est appelé lorsqu'un joueur entre dans une zone de gang tags: ["player", "gangzone"] --- <VersionWarn name='callback' version='omp v1.1.0.2612' /> ## Description Ce rappel est appelé lorsqu'un joueur entre dans une zone de gang | Nom | Description | | --------- | ----------------------------------------------- | | playerid | L'ID du joueur qui est entré dans la zone de gang. | | zoneid | L'ID de la zone de gang dans laquelle le joueur est entré. | ## Retours Il est toujours appelé en premier dans le gamemode. ## Exemples ```c public OnPlayerEnterGangZone(playerid, zoneid) { new string[128]; format(string, sizeof(string), "Vous entrez dans la zone de gang %i", zoneid); SendClientMessage(playerid, 0xFFFFFFFF, string); return 1; } ``` ## Rappels Relatives Les rappels suivants peuvent être utiles, car ils sont liés à ce rappel d'une manière ou d'une autre. - [OnPlayerLeaveGangZone](OnPlayerLeaveGangZone): Ce rappel est appelé lorsqu'un joueur quitte une zone de gang. ## Fonctions Relatives Les fonctions suivantes peuvent être utiles, car elles sont liées à ce rappel d'une manière ou d'une autre. - [GangZoneCreate](../functions/GangZoneCreate): Crée une zone de gang (zone radar colorée). - [GangZoneDestroy](../functions/GangZoneDestroy): Détruit une zone de gang. - [UseGangZoneCheck](../functions/UseGangZoneCheck): Active le rappel lorsque qu'un joueur entre dans cette zone.
openmultiplayer/web/docs/translations/fr/scripting/Callbacks/OnPlayerEnterGangZone.md/0
{ "file_path": "openmultiplayer/web/docs/translations/fr/scripting/Callbacks/OnPlayerEnterGangZone.md", "repo_id": "openmultiplayer", "token_count": 571 }
388
--- title: OnPlayerPickupStreamIn description: Ce rappel est appelé lorsque qu'un objet joueur-pickup entre dans la portée visuelle du joueur. tags: ["player", "pickup", "playerpickup"] --- <VersionWarn name='callback' version='omp v1.1.0.2612' /> ## Description Ce rappel est appelé lorsque qu'un objet joueur-pickup entre dans la portée visuelle du joueur. | Nom | Description | |----------|------------------------------------------------------------------------------------------------| | pickupid | L'ID de l'objet joueur-pickup, retourné par [CreatePlayerPickup](../functions/CreatePlayerPickup) | | playerid | L'ID du joueur dans la portée visuelle duquel l'objet joueur-pickup entre. | ## Retours Il est toujours appelé en premier dans le gamemode. ## Exemples ```c new g_PlayerPickupHealth[MAX_PLAYERS]; public OnPlayerConnect(playerid) { g_PlayerPickupHealth[playerid] = CreatePlayerPickup(playerid, 1240, 2, 2009.8474, 1218.0459, 10.8175); return 1; } public OnPlayerPickupStreamIn(pickupid, playerid) { if (pickupid == g_PlayerPickupHealth[playerid]) { printf("g_PlayerPickupHealth est diffusé pour l'ID du joueur %d", playerid); } return 1; } ``` ## Rappels Relatives Les rappels suivants peuvent être utiles, car ils sont liés à ce rappel d'une manière ou d'une autre. - [OnPlayerPickUpPlayerPickup](OnPlayerPickUpPlayerPickup): Appelé lorsque qu'un joueur ramasse un objet joueur-pickup. - [OnPlayerPickupStreamOut](OnPlayerPickupStreamOut): Appelé lorsque qu'un objet joueur-pickup quitte la portée visuelle du joueur. ## Fonctions Relatives Les fonctions suivantes peuvent être utiles, car elles sont liées à ce rappel d'une manière ou d'une autre. - [CreatePlayerPickup](../functions/CreatePlayerPickup): Crée un objet joueur-pickup qui sera visible pour un seul joueur. - [DestroyPlayerPickup](../functions/DestroyPlayerPickup): Détruit un objet joueur-pickup.
openmultiplayer/web/docs/translations/fr/scripting/Callbacks/OnPlayerPickupStreamIn.md/0
{ "file_path": "openmultiplayer/web/docs/translations/fr/scripting/Callbacks/OnPlayerPickupStreamIn.md", "repo_id": "openmultiplayer", "token_count": 803 }
389
--- title: OnRconLoginAttempt description: Cette callback est appelée lorsque quelqu'un tente de se connecte en RCON, avec succès ou pas. tags: [] --- ## Paramètres Cette callback est appelée lorsque quelqu'un tente de se connecte en RCON, avec succès ou pas. | Nom | Description | | ------------------- | -------------------------------------------------------------------- | | `string` ip[] | L'IP du joueur qui a tenté de se connecter | | `string` password[] | Le mot de passe utilisé pour se connecter | | `int` success | **0** si le mot de passe est incorrect, ou **1** si il est correct | ## Valeur de retour Cette callback ne retourne rien, mais doit retourner quelque chose. Autrement dit, `return callback();` ne fonctionnera pas car la callback ne retourne rien, mais un return _(`return 1;` ou `return 0;`)_ doit être effectué dans la callback. ## Exemple ```c public OnRconLoginAttempt(ip[], password[], success) { if(!success) //Si le mot de passe est incorrect { printf("CONNEXION RCON ECHOUÉE PAR L'IP %s EN UTILISANT LE MOT DE PASSE %s",ip, password); new pip[16]; for(new i=0; i<MAX_PLAYERS; i++) //Boucle qui passe par tous les joueurs { GetPlayerIp(i, pip, sizeof(pip)); if(!strcmp(ip, pip, true)) //Si l'IP du joueur est l'IP qui a tentée de se connecter. { SendClientMessage(i, 0xFFFFFFFF, "Mauvais mot de passe. Bye!"); //Envoie un message Ban(i); //Il est maintenant banni } } } return 1; } ``` ## Astuces :::tip Cette callback est appelée uniquement lorsque /rcon login est utilisé. ::: ## Fonctions connexes - [IsPlayerAdmin](../functions/IsPlayerAdmin): Vérifie si un joueur est loggé en RCON. - [SendRconCommand](../functions/SendRconCommand): Exécute une commande RCON via le script.
openmultiplayer/web/docs/translations/fr/scripting/Callbacks/OnRconLoginAttempt.md/0
{ "file_path": "openmultiplayer/web/docs/translations/fr/scripting/Callbacks/OnRconLoginAttempt.md", "repo_id": "openmultiplayer", "token_count": 885 }
390
--- title: AddPlayerClass description : Ajoute une classe à la sélection de classes. tags: ["player"] --- ## Description Ajoute une classe à la sélection de classe. Les classes sont utilisées pour que les joueurs puissent apparaître avec un skin de leur choix. | Nom | Description | | -------------- | ------------------------------------------------------------------- | | modelid | Le skin avec lequel le joueur apparaîtra. | | Float:spawn_x | La coordonnée X du spawnpoint de cette classe. | | Float:spawn_y | La coordonnée Y du spawnpoint de cette classe. | | Float:spawn_z | La coordonnée Z du spawnpoint de cette classe. | | Float:z_angle | La direction dans laquelle le joueur doit faire face après le frai. | | weapon1 | La première arme d'apparition pour le joueur. | | weapon1_ammo | La quantité de munitions pour l'arme d'apparition principale. | | weapon2 | La deuxième arme d'apparition pour le joueur. | | weapon2_ammo | La quantité de munitions pour la deuxième arme d'apparition. | | weapon3 | La troisième arme d'apparition pour le joueur. | | weapon3_ammo | La quantité de munitions pour la troisième arme d'apparition. | ## Retour L'ID de la classe qui vient d'être ajoutée. 319 si la limite de classe (320) a été atteinte. L'ID de classe le plus élevé possible est 319. ## Exemples ```c public OnGameModeInit() { // Les joueurs peuvent apparaître avec le skin "CJ" (0) ou le skin "The Truth" (1). AddPlayerClass(0, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0); // CJ AddPlayerClass(1, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0); // The Trush return 1; } ``` ## Remarques :::tip L'ID de classe maximum est de 319 (à partir de 0, donc un total de 320 classes). Lorsque cette limite est atteinte, toute autre classe ajoutée remplacera l'ID 319. ::: ## Fonctions associées - [AddPlayerClassEx](AddPlayerClassEx): Ajoutez une classe avec une équipe par défaut. - [SetSpawnInfo](SetSpawnInfo): définissez le paramètre d'apparition d'un joueur. - [SetPlayerSkin](SetPlayerSkin): Définissez le skin d'un joueur.
openmultiplayer/web/docs/translations/fr/scripting/functions/AddPlayerClass.md/0
{ "file_path": "openmultiplayer/web/docs/translations/fr/scripting/functions/AddPlayerClass.md", "repo_id": "openmultiplayer", "token_count": 1051 }
391
--- title: SetVehicleAngularVelocity description: Beállítja a jármű X, Y és Z szögsebességét. tags: ["vehicle"] --- :::info Ez a függvény a _world_ térben van, nem a _local_ térben. Ha a helyi tér szögsebességét szeretné módosítani, akkor a [jármű rotációs quat](GetVehicleRotationQuat) alapján elforgatási mátrixot kell alkalmaznia. ::: ## Leírás Beállítja a jármű X, Y és Z szögsebességét | Név | Leírás | | --------- | --------------------------------------------------- | | vehicleid | A jármű azonosítója a sebesség beállításához. | | Float:X | A sebesség mértéke az X szögirányban. | | Float:Y | A sebesség mértéke az Y szögirányban. | | Float:Z | A sebesség mértéke az Z szögirányban. | ## Visszatérés 1: A funkció sikeresen végrehajtva. 0: A funkció végrehajtása nem sikerült. A jármű nem létezik. ## Példák ```c public OnPlayerCommandText(playerid, cmdtext[]) { if (!strcmp("/spin", cmdtext)) { if (IsPlayerInAnyVehicle(playerid)) { SetVehicleAngularVelocity(GetPlayerVehicleID(playerid), 0.0, 0.0, 2.0); } return 1; } } ``` ## Megjegyzések :::warning Ez a funkció nincs hatással az üres járművekre, és nincs hatással a vonatokra. ::: ## Related Functions - [SetVehicleVelocity](SetVehicleVelocity): A jármű sebességének a beállítása - [GetVehicleVelocity](GetVehicleVelocity): A jármű sebességének a lekérdezése.
openmultiplayer/web/docs/translations/hu/scripting/functions/SetVehicleAngularVelocity.md/0
{ "file_path": "openmultiplayer/web/docs/translations/hu/scripting/functions/SetVehicleAngularVelocity.md", "repo_id": "openmultiplayer", "token_count": 806 }
392
--- title: OnGameModeExit description: Callback ini akan terpanggil ketika gamemode berakhir, entah itu lewat 'gmx', server yang dimatikan, atau GameModeExit. tags: [] --- ## Deskripsi Callback ini akan terpanggil ketika gamemode berakhir, entah itu lewat 'gmx' server yang dimatikan, atau GameModeExit. ## Contoh ```c public OnGameModeExit() { print("Mode Game berakhir."); return 1; } ``` ## Catatan :::tip Fungsi ini juga dapat digunakan dalam sebuah filterscript untuk mendeteksi apakah sebuah gamemode berubah dengan perintah RCON seperti changemode atau gmx, sebagaimana gamemode tidak dapat memuat ulang filterscript. Ketika menggunakan OnGameModeExit sehubungan dengan perintah konsol 'rcon gmx' perlu diingat akan ada potensi client bugs terjadi seperti contoh panggilan RemoveBuildingForPlayer yang berlebihan selama OnGameModeInit yang dapat mengakibatkan crash pada client. Callback ini TIDAK akan dipanggil apabila server crash atau prosesnya dimatikan dengan cara lain, seperti menggunakan perintah kill di linux atau menekan tombol close pada konsol windows. ::: ## Related Functions - [GameModeExit](../functions/GameModeExit.md): Keluar dari gamemode saat ini.
openmultiplayer/web/docs/translations/id/scripting/callbacks/OnGameModeExit.md/0
{ "file_path": "openmultiplayer/web/docs/translations/id/scripting/callbacks/OnGameModeExit.md", "repo_id": "openmultiplayer", "token_count": 434 }
393
--- title: OnPlayerFinishedDownloading description: callback ini memanggil jika player sudah selesai mendownload custom models. tags: ["player"] --- <VersionWarn name='callback' version='SA-MP 0.3.DL R1' /> ## Description callback ini memanggil jika player sudah selesai mendownload custom models. Untuk informasi lebih lanjut cara menambahkan custom models ke dalam servermu, Kunjungi [release thread](https://sampforum.blast.hk/showthread.php?tid=644105) and [this tutorial](https://sampforum.blast.hk/showthread.php?tid=644123). | Name | Description | | ------------ | ------------------------------------------------------------------------------ | | playerid | ID dari player yang sudah mendownload custom models. | | virtualworld | ID dari virtual world jika player selesai mendownload custom models. | ## Returns callback ini tidak menangani returns. ## Examples ```c public OnPlayerFinishedDownloading(playerid, virtualworld) { SendClientMessage(playerid, 0xFFFFFFFF, "Downloads finished."); return 1; } ``` ## Notes :::tip Callback ini terpanggil sepanjang waktu jika player berganti virtual world, meskipun tidak ada custom models di world itu. ::: ## Related Callbacks Callback berikut mungkin berguna, karena terkait dengan callback ini dalam satu atau lain cara - [OnPlayerConnect](OnPlayerConnect): Callback ini terpanggil jika player terhubung kedalam server. - [OnPlayerDisconnect](OnPlayerDisconnect): Callback ini terpanggil jika player keluar dari server. - [OnIncomingConnection](OnIncomingConnection): Callback ini terpanggil jika player mencoba terhubung kedalam server.
openmultiplayer/web/docs/translations/id/scripting/callbacks/OnPlayerFinishedDownloading/0
{ "file_path": "openmultiplayer/web/docs/translations/id/scripting/callbacks/OnPlayerFinishedDownloading", "repo_id": "openmultiplayer", "token_count": 604 }
394
--- title: BanEx description: Melarang player dengan alasan. tags: ["administration"] --- ## Deskripsi Melarang player dengan alasan. | Name | Description | | -------- | -------------------------------------- | | playerid | ID player yang ingin dilarang bermain. | | reason | Alasan dilarang bermain. | ## Returns Fungsi ini tidak me-return value yang spesifik. ## Contoh ```c public OnPlayerCommandText( playerid, cmdtext[] ) { if (!strcmp(cmdtext, "/banme", true)) { // Melarang player yang mengeksekusi perintah ini dengan mencantumkan alasan ("Request") BanEx(playerid, "Request"); return 1; } } /*Untuk memunculkan pesan (contoh: alasan) untuk player sebelum koneksi terputus Anda harus menggunakan timer untuk membuat sebuah delay. Delay ini hanya membutuhkan beberapa milisekon saja, akan tetapi contoh ini menggunakan satu detik penuh hanya untuk berjaga-jaga.*/ forward BanExPublic(playerid, reason[]); public BanExPublic(playerid, reason[]) { BanEx(playerid, reason); } stock BanExWithMessage(playerid, color, message[], reason[]) { //reason - Alasan larangan yang telah digunakan BanEx. SendClientMessage(playerid, color, message); SetTimerEx("BanExPublic", 1000, false, "ds", playerid, reason); } public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp(cmdtext, "/banme", true) == 0) { //Larang player yang menggunakan perintah ini. BanExWithMessage(playerid, 0xFF0000FF, "Anda telah di Banned!", "Request"); return 1; } return 0; } ``` ## Catatan :::warning Tindakan apa pun yang diambil langsung sebelum Ban() (seperti mengirim pesan dengan SendClientMessage) tidak akan sampai ke player, oleh karena itu timer harus digunakan untuk menunda pelarangan ::: ## Fungsi Terkait - [Ban](Ban): Melarang player yang sedang berada di dalam server. - [Kick](Kick): Kick player dari server.
openmultiplayer/web/docs/translations/id/scripting/functions/BanEx.md/0
{ "file_path": "openmultiplayer/web/docs/translations/id/scripting/functions/BanEx.md", "repo_id": "openmultiplayer", "token_count": 773 }
395
--- title: tickcount description: Fungsi ini dapat digunakan untuk mengganti GetTickCount, pada saat mengembalikan angka milisekon saat dari server menyala. tags: [] --- <LowercaseNote /> ## Deskripsi Fungsi ini dapat digunakan untuk mengganti GetTickCount, pada saat mengembalikan angka milisekon dari saat server menyala. | Nama | Deskripsi | | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | &granularity=0 | Saat return, nilai ini berisi jumlah tik yang akan dicentang oleh waktu internal sistem per detik. Oleh karena itu, nilai ini menunjukkan keakuratan nilai return dari fungsi ini. | ## Returns Jumlah milidetik sejak server menyala. Untuk sel 32-bit, hitungan ini akan melebihi setelah kira-kira 24 hari operasi berkelanjutan. ## Fungsi Terkait - [GetTickCount](GetTickCount): Mendapatkan waktu uptime server.
openmultiplayer/web/docs/translations/id/scripting/functions/Tickcount.md/0
{ "file_path": "openmultiplayer/web/docs/translations/id/scripting/functions/Tickcount.md", "repo_id": "openmultiplayer", "token_count": 498 }
396
--- id: limits title: Limits description: Sebuah daftar dari semua batasan yang diberlakukan oleh game/server. tags: [] --- ## Entitas In-game | Tipe | Batasan | | -------------------------------------------------------------- | ------------- | | Pemain | 1000 | | Kendaraan (4)(6) | 2000 | | Model Kendaraan (1) | Tak hingga | | Objek (4)(6) | 1000 | | Dunia Virtual (_Virtual Worlds_) | 2,147,483,647 | | Interior | 256 | | Kelas | 320 | | Ikon Peta (4) | 100 | | Cekpoin Balap (_Race Checkpoints_) (4) | 1 | | Cekpoin (4) | 1 | | Pickup (4) | 4096 | | Label 3D Global (4) | 1024 | | Label Teks 3D per-pemain (4) | 1024 | | String Chat Bubble | 144 karakter | | Panjang teks SetObjectMaterialText,SetPlayerObjectMaterialText | 2048 karakter | | Zona Gang (_Gangzone_) | 1024 | | Menu | 128 | | Objek player terpasang | 10 | | Variable Player | 800 | | Aktor (since 0.3.7) (4)(5) | 1000 | | Ledakan | 10 | ## Properti Server | Tipe | Batasan | | ---------------------------- | ------------------- | | Gamemodes | 16 | | Filterscripts | 16 | | Masukan Teks (Chat/Perintah) | 128 sel (512 bytes) | | Keluaran Teks | 144 sel (576 bytes) | | Panjang Nama (SetPlayerName) | 24 karakter | ## Textdraws | Type | Limit | | ---------------------------------------------------- | ------------- | | Panjang string (2) | 1024 karakter | | Yang dapat ditampilkan dalam 1 layar klien (3) | 2048 + 256 | | Yang dapat ditampilkan dalam 1 layar klien (sprites) | 100 | | Dibuat oleh _server_ (Global) | 2048 | | Dibuat oleh _server_ (Per-Player) | 256 | ## Dialog | Tipe | Batasan | | ------------------------------------------------------------------- | ------- | | ID Dialog | 32768 | | Info (Teks utama) | 4096 | | Judul | 64 | | Kotak Teks Masukan (_Input Text Box_) (DIALOG_STYLE_INPUT/PASSWORD) | 128 | | Jumlah Kolom pada Daftar Tab (DIALOG_STYLE_TABLIST(\_HEADERS)) | 4 | | Karakter Kolom pada Daftar Tab (DIALOG_STYLE_TABLIST(\_HEADERS)) | 128 | | Karakter Baris pada Daftar Tab (DIALOG_STYLE_TABLIST(\_HEADERS)) | 256 | Catatan: 1. Meskipun batasan model kendaraan di 0.3 adalah tak hingga, jika Anda menggunakan model kendaraan dalam jumlah besar, maka akan memengaruhi performa klien. 2. Meskipun batasan string textdraw adalah 1024 karakter, jika kode warna (contoh: ~r~) digunakan pada karakter ke-255 atau lebih, maka memungkinkan klien akan _crash_. 3. Ini memungkinkan untuk memunculkan semua Textdraw dalam satu waktu untuk satu play, bagaimanapun ini tidak direkomendasikan. 4. Untuk mengatasi batasan-batasan ini, dapat menggunakan sebuah [streamer](https://github.com/samp-incognito/samp-streamer-plugin). Streamer hanya bekerja membuat entitas, dll. yang dekat dengan pemain. 5. Dikarenakan batasan pada klien hanya dapat memunculkan hingga 51 aktor dalam satu waktu. 6. ID Kendaraan dan ID Object dimulai dari 1 dan dengan demikian memiliki rentang dari 1 hingga 1999, meskipun MAX_VEHICLES bernilai 2000.
openmultiplayer/web/docs/translations/id/scripting/resources/limits.md/0
{ "file_path": "openmultiplayer/web/docs/translations/id/scripting/resources/limits.md", "repo_id": "openmultiplayer", "token_count": 2815 }
397
--- id: vehicleinformationtypes title: Informasi Tipe Kendaraan description: Konstanta Informasi Tipe Kendaraan --- | Informasi Tipe Kendaraan | Deskripsi | | --------------------------------- | -------------------------------------------------------------- | | VEHICLE_MODEL_INFO_SIZE | Ukuran kendaraan | | VEHICLE_MODEL_INFO_FRONTSEAT | Posisi tempat duduk depan\* | | VEHICLE_MODEL_INFO_REARSEAT | Posisi tempat duduk belakang\* | | VEHICLE_MODEL_INFO_PETROLCAP | Posisi tutup bensin\* | | VEHICLE_MODEL_INFO_WHEELSFRONT | Posisi ban depan\* | | VEHICLE_MODEL_INFO_WHEELSREAR | Posisi ban belakang\* | | VEHICLE_MODEL_INFO_WHEELSMID | Posisi ban tengah (penerapan untuk kendaraan dengan 3 sumbu)\* | | VEHICLE_MODEL_INFO_FRONT_BUMPER_Z | Ketinggian bemper depan | | VEHICLE_MODEL_INFO_REAR_BUMPER_Z | Ketinggian bemper belakang | \* = Nilai-nilai ini telah diperhitungkan dari tengah kendaraan. ## Fungsi Terkait - [GetVehicleModelInfo](/docs/scripting/functions/GetVehicleModelInfo): Mendapatkan informasi tentang model kendaraan tertentu, seperti ukuran atau posisi tempat duduk.
openmultiplayer/web/docs/translations/id/scripting/resources/vehicleinformationtypes.md/0
{ "file_path": "openmultiplayer/web/docs/translations/id/scripting/resources/vehicleinformationtypes.md", "repo_id": "openmultiplayer", "token_count": 830 }
398
--- titolo: contribuire descrizione: Come contribuire alla documentazione della Wiki di SA-MP e open.mp --- Questa documentazione è open-source per chiunque voglia contribuire! Basta solamente un account [GitHub](https://github.com) e del tempo libero. Non hai nemmeno bisogno di conoscere il linguaggio Git, puoi direttamente contribuire dall'interfaccia web! Se vuoi mantenere una specifica lingua apri una pull request ai [`CODEOWNERS`](https://github.com/openmultiplayer/web/blob/master/CODEOWNERS) del file e aggiungi una linea con la directory della lingua accompagnato al tuo username. ## Modifica dei contenuti Su ogni pagina, vi è un bottone che porta alla pagina di GitHub per poterne modificare il contenuto: !['Modifica questa pagina' link presente su ogni pagina della wiki](images/contributing/edit-this-page.png) Per esempio, cliccando questo sulla funzione [SetVehicleAngularVelocity](../scripting/functions/SetVehicleAngularVelocity) ti porterà a [questa pagina](https://github.com/openmultiplayer/web/edit/master/docs/scripting/functions/SetVehicleAngularVelocity.md) che presenta un text editor per poter effettuare modifiche ad un file (assumendo il fatto che tu sia loggato su GitHub). Fai la tua modifica e invia una "Pull request" ciò significa che i mantenitori della wiki e gli altri membri della community potranno revisionare le tue modifiche, discutere qualora vi sia il bisogno di ulteriori modifiche ed effettuare il merge. ## Aggiungere nuovi contenuti Aggiungere nuovi contenuti è un po' più complicato. Puoi farlo in due maniere: ### Interfaccia GitHub Quando navighi su una directory su Github, troverai un pulsante "Add file" nell'angolo in alto a destra della lista file: ![Bottone 'Add file'](images/contributing/add-new-file.png) Vi è anche la possibilità di poter uploddare un file Markdown che hai già scritto oppure scriverlo direttamente nel text editor di GitHub. Il file deve avere l'estensione `.md` e contenere Markdown. Per ulteriori informazioni sul Markdown dai un'occhiata a [questa guida](https://guides.github.com/features/mastering-markdown/). Dopo aver concluso, clicca su "Propose new file" e una Pull Request verrà aperta per effettuare la revisione del codice. ### Git Se vuoi usare Git, tutto quello che devi fare è clonare la repository della Wiki con la bash: ```sh git clone https://github.com/openmultiplayer/wiki.git ``` Ora potrai aprire la repository nel tuo editor di testo preferito. Raccomando personalmente Visual Studio Code dato che ha degli ottimi tools per editare e formattare i file Markdown. Come puoi vedere, sto scrivendo questa documentazione usando Visual Studio Code! ![Anteprima Markdown Visual Studio Code](images/contributing/vscode.png) Raccomando due estensioni per un'esperienza migliore: - [markdownlint](https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint) di David Anson - Questa estensione si assicura del fatto che il tuo Markdown sia formattato in maniera corretta. Previene errori di sintassi e semantica. Non tutti i warnings sono importanti ma alcuni possono aiutare a migliorare la leggibilità del codice. Usa il miglior strumento di valutazione e se hai un dubbio chiedi ad un reviewer! - [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) creata dal team Prettier.js - Prettier.js formatterà automaticamente i tuoi file Markdown automaticamente cosicché tutto il testo usi uno stile coerente. La repository della wiki ha alcune impostazioni nel suo file `package.json` che l'estensione dovrebbe usare in modo autonomo. Assicurati di abilitare "Format On Save" nelle impostazioni dell'editor così i tuoi file Markdown verranno automaticamente formattati ogni volta che salvi il file! ## Note, consigli e convenzioni ### Link Interni Non usare URL assoluti per i link. Usa solo percorsi relativi. - ❌ ```md Da utilizzare con [OnPlayerClickPlayer](https://www.open.mp/docs/scripting/callbacks/OnPlayerClickPlayer) ``` - ✔ ```md Da utilizzare con [OnPlayerClickPlayer](../callbacks/OnPlayerClickPlayer) ``` `../` significa "salire di una directory" dunque se il file che stai editando è dentro la directory `functions` e lo stai collegando a `callbacks` si utilizza `../` per salire alla directory `scripting/` seguita da `callbacks/` per poter entrare nella directory dei callbacks, infine inserire il nome del file (senza `.md`) del callback che vuoi collegare. ### Immagini Le immagini vanno in una sub-directory dentro `/static/images`. Successivamente quando linki un immagine in un `![]()`basta usare `/images/` come path base (non c'è nessun bisogno di usare `static`è solo per la repository). Se hai dei dubbi, leggi un'altra pagina che usa delle immagini e imita il procedimento. ### Metadata La prima cosa in _ogni_ documento dovrebbe essere il metadata: ```mdx --- titolo: Il mio documento descrizione: Questa pagina parla di roba, cose e hamburgers, evvai! --- ``` Ogni pagina dovrebbe includere un titolo e una descrizione. Per una lista completa di cosa può andare in mezzo alle `---` dai un'occhiata qui [Documentazione di Docusaurus](https://v2.docusaurus.io/docs/markdown-features#markdown-headers). ### Headings Non creare un header di livello 1 (`<h1>`) con `#` dato che viene generato automaticamente. Il tuo primo header dovrebbe _sempre_ essere `##` - ❌ ```md # Il mio titolo Questa è una documentazione per ... # Sottosezione ``` - ✔ ```md Questa è una documentazione per ... ## Sottosezione ``` ### Usa gli Snippets di `Code` per referenze tecniche Quando stai scrivendo un paragrafo che contiene nomi di funzioni, numeri, espressioni o qualsiasi cosa che non sia un linguaggio non-standard, avvolgili in questo modo \`backticks\`. Questo facilita la separazione del linguaggio e la descrizione delle cose da riferimenti a elementi tecnici come nomi di funzioni o pezzi di codice. - ❌ > La funzione fopen ritornerà un valore che contiene il tag del tipo di file:, non c'è nessun problema su quella linea di codice poiché il valore ritornato è storato in una variabile che inoltre contiene anche il tag del file: (notare che anche i casi sono gli stessi). In ogni caso nella linea successiva il valore 4 è aggiunto al handle file. 4 non ha nessun tag [...] - ✔ > La funzione `fopen` ritornerà un valore che contiene il tag del tipo di `file:`, non c'è nessun problema su quella linea di codice poiché il valore ritornato è storato in una variabile che inoltre contiene anche il tag del `file:` (notare che anche i casi sono gli stessi). In ogni caso nella linea successiva il valore `4` è aggiunto al handle file. `4` non ha nessun tag. Nel precedente esempio, `fopen` è il nome di una funzione, non una parola inglese, dunque avvolgila usando `codice` evidenziare usando gli snippets aiuta a distinguerli da altri contenuti. Inoltre, se il paragrafo si riferisce ad un esempio di blocco di codice, esso aiuta il lettore ad associare le parole con degli esempi. ### Tabelle Se una tabella ha un header, va nella parte superiore: - ❌ ```md | | | | ------- | ------------------------------------- | | Vita | Stato del motore | | 650 | Non danneggiato | | 650-550 | Fumo bianco | | 550-390 | Fumo grigio | | 390-250 | Fumo nero | | < 250 | In fiamme (esploderà successivamente) | ``` - ✔ ```md | Vita | Stato del motore | | ------- | ------------------------------------- | | 650 | Non danneggiato | | 650-550 | Fumo bianco | | 550-390 | Fumo grigio | | 390-250 | Fumo nero | | < 250 | In fiamme (esploderà successivamente) | ``` ## Migrare dalla Wiki di SA-MP La maggior parte dei contenuti sono stati spostati, però se trovi una pagina mancante, qui vi è una piccola guida per convertire il contenuto in Markdown ### Prendere l'HTML 1. Clicca questo bottone (Firefox) ![image](images/contributing/04f024579f8d.png) (Chrome) ![image](images/contributing/f62bb8112543.png) 2. Posiziona il mouse in alto a sinistra della pagina wiki principale, nel margine sinistro o nell'angolo finché non vedi `#content` ![image](images/contributing/65761ffbc429.png) Oppure cerca `<div id=content>` ![image](images/contributing/77befe2749fd.png) 3. Copia l'HTML interno di quell'elemento ![image](images/contributing/8c7c75cfabad.png) Ora hai _solamente_ il codice HTML per il _contenuto_ concreto della pagina, il materiale che ci importa e che puoi convertire in Markdown. ### Convertire l'HTML in Markdown Per convertire l'HTML di base (niente tabelle) in Markdown usa: https://domchristie.github.io/turndown/ ![image](images/contributing/77f4ea555bbb.png) ^^ Nota come tutta la tabella si sia sballata completamente... ### Tabelle HTML a Tabelle in Markdown Il tool soprastante non supporta le tabelle, usa questo tool: https://jmalarcon.github.io/markdowntables/ E copia solo l'elemento della tabella `<table>` dentro: ![image](images/contributing/57f171ae0da7.png) ### Pulire La conversione molto probabilmente non sarà pervetta. Pertanto avrai da fare un po' di pulizia manuale. L'estensioni di formattazione citate sopra dovrebbero aiutare ma potresti tuttavia avere ancora bisogno di spendere del tempo per sistemarlo manualmente. Se non hai tempo, non ti preoccupare! Inoltra una bozza non finita e qualcun altro può riprendere da dove hai lasciato! ## Contratto di licenza Tutti i progetti open.mp hanno un [Contratto di licenza per collaboratori](https://cla-assistant.io/openmultiplayer/homepage). Questo in pratica significa solamente che accetti di lasciarci usare il tuo lavoro, e metterlo sotto licenza open-source. Quando si apre una Pull Request per la prima volta, il bot assistente CLA posterà un link dove puoi firmare il contratto.
openmultiplayer/web/docs/translations/it/meta/Contributing.md/0
{ "file_path": "openmultiplayer/web/docs/translations/it/meta/Contributing.md", "repo_id": "openmultiplayer", "token_count": 3834 }
399
--- title: AllowPlayerTeleport description: Włącza/wyłącza graczom możliwość teleportacji przez klikanie prawym przyciskiem myszy na mapie. tags: ["player"] --- :::warning Ta funkcja od wersji 0.3d jest przestarzała. Sprawdź OnPlayerClickMap. ::: ## Opis Włącza/wyłącza graczom możliwość teleportacji przez klikanie prawym przyciskiem myszy na mapie. | Nazwa | Opis | | -------- | ------------------------------------------------------------ | | playerid | ID gracza, który ma mieć przełączoną możliwość teleportacji. | | allow | 1 - włącza, 0 - wyłącza. | ## Zwracane wartości Ta funkcja nie zwraca żadnych konkretnych wartości. ## Przykłady ```c public OnPlayerConnect( playerid ) { // Pozwala graczowi na teleportację przez kliknięcie prawym przyciskiem myszy na mapie, // ponieważ jest to w OnPlayerConnect, wykona się to dla KAŻDEGO gracza AllowPlayerTeleport( playerid, 1 ); } ``` ## Uwagi :::warning Ta funkcja będzie działać tylko jeżeli AllowAdminTeleport jest włączone, musisz być również administratorem. ::: ## Powiązane funkcje - [AllowAdminTeleport](AllowAdminTeleport.md): Przełącza teleportowanie do punktu docelowego dla administratorów RCON.
openmultiplayer/web/docs/translations/pl/scripting/functions/AllowPlayerTeleport.md/0
{ "file_path": "openmultiplayer/web/docs/translations/pl/scripting/functions/AllowPlayerTeleport.md", "repo_id": "openmultiplayer", "token_count": 634 }
400
--- title: OnGameModeInit description: Esta callback é acionada quando uma gamemode inicia. tags: [] --- ## Descrição Esta callback é acionada quando uma gamemode inicia. ## Exemplos ```c public OnGameModeInit() { print("A Gamemode Iniciou!"); return 1; } ``` ## Notas :::tip Esta função também pode ser usada em um filterscript para detectar se a gamemode mudou através de comandos do RCON como o "changemode" ou "gmx", pois mudar o gamemode não recarrega um filterscript. ::: ## Funções Relacionadas
openmultiplayer/web/docs/translations/pt-BR/scripting/callbacks/OnGameModeInit.md/0
{ "file_path": "openmultiplayer/web/docs/translations/pt-BR/scripting/callbacks/OnGameModeInit.md", "repo_id": "openmultiplayer", "token_count": 206 }
401
--- title: OnPlayerDeath description: Esta callback é chamada quando um jogador morre, tanto por suicídio ou por ser morto por outros jogadores. tags: ["player"] --- ## Descrição Esta callback é chamada quando um jogador morre, tanto por suicídio ou por ser morto por outros jogadores. | Nome | Descrição | |---------------|---------------------------------------------------------------------------------------| | playerid | O ID do jogador que morreu | | killerid | O ID do jogador que matou o jogador que morreu, ou INVALID_PLAYER_ID se não houve um. | | WEAPON:reason | O ID do motivo da morte do jogador. | ## 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 new PlayerDeaths[MAX_PLAYERS]; new PlayerKills[MAX_PLAYERS]; public OnPlayerDeath(playerid, killerid, WEAPON:reason) { SendDeathMessage(killerid, playerid, reason); // Mostra o kill no killfeed // Verifica se o ID do jogador que matou é valido antes de fazer qualquer coisa if (killerid != INVALID_PLAYER_ID) { PlayerKills[killerid] ++; } // Fora da verificação, faça os códigos desejados para o jogador que morreu. PlayerDeaths[playerid] ++; return 1; } ``` ## Notas :::tip O motivo da morte retornará 37 (Lança Chamas) para qualquer fonte que utilize fogo (EX: Molotov). O motivo da morte retornará 51 para qualquer fonte que utilize explosões (EX: RPG, granada). Você não precisa verificar se o killerid é valido antes de usa-lo no SendDeathMessage. INVALID_PLAYER_ID é um parâmetro valido nesta função. playerid é o único que pode chamar esta callback. ::: :::warning Você PRECISA verificar se 'killerid' é valido (não INVALID_PLAYER_ID) antes de usa-lo em uma array (ou qualquer outro lugar), pois isso irá ocasionar no crash do OnPlayerDeath (não o script todo). Isto é devido ao INVALID_PLAYER_ID ser definido como 65535, e se uma array tem apenas 'MAX_PLAYERS' como definição do número de elementos, você estaria tentando acessar um index inválido. ::: ## Related Functions - [SendDeathMessage](../functions/SendDeathMessage): Adiciona a kill para a lista de mortes. - [SetPlayerHealth](../functions/SetPlayerHealth): Define a vida de um jogador.
openmultiplayer/web/docs/translations/pt-BR/scripting/callbacks/OnPlayerDeath.md/0
{ "file_path": "openmultiplayer/web/docs/translations/pt-BR/scripting/callbacks/OnPlayerDeath.md", "repo_id": "openmultiplayer", "token_count": 1035 }
402
--- title: OnPlayerObjectMoved description: Esta callback é chamada quando o objeto de um jogador é movido após o MovePlayerObject (quando para de se mover). tags: ["player"] --- ## Descrição Esta callback é chamada quando o objeto de um jogador é movido após o MovePlayerObject (quando para de se mover). | Nome | Descrição | | -------- | ---------------------------------------------- | | playerid | O ID do jogador a qual o objeto está associado | | objectid | O ID do objeto do jogador que foi movido | ## Retorno É sempre chamado primeiro nos filterscripts. ## Exemplos ```c public OnPlayerObjectMoved(playerid, objectid) { printf("Objeto de ogador movido: objectid: %d playerid: %d", objectid, playerid); return 1; } ``` ## Notas :::tip <TipNPCCallbacksPT /> ::: ## Funções Relacionadas - [MovePlayerObject](../functions/MovePlayerObject): Move o objeto de um jogador. - [IsPlayerObjectMoving](../functions/IsPlayerObjectMoving): Verifica se um objeto de jogador está se movendo. - [StopPlayerObject](../functions/StopPlayerObject): Faz um objeto de jogador parar de se mover. - [CreatePlayerObject](../functions/CreatePlayerObject): Cria um objeto apenas para um jogador. - [DestroyPlayerObject](../functions/DestroyPlayerObject): Destrói o objeto de um jogador.
openmultiplayer/web/docs/translations/pt-BR/scripting/callbacks/OnPlayerObjectMoved.md/0
{ "file_path": "openmultiplayer/web/docs/translations/pt-BR/scripting/callbacks/OnPlayerObjectMoved.md", "repo_id": "openmultiplayer", "token_count": 473 }
403
--- title: OnTrailerUpdate description: Essa callback é executada quando o jogador envia um update para um trailer. tags: [] --- ## Descrição Essa callback é executada quando o jogador envia um update para um trailer. | Nome | Descrição | | --------- | ------------------------------------------------- | | playerid | ID do jogador que enviou o update para o trailer. | | vehicleid | ID do trailer que sofreu o update. | ## Retornos 0 - Cancela o update ser transmitido para outros jogadores. O update continua a ser processado pelo jogador que enviou. 1 - Processa o update do trailer normalmente e sincroniza com todos os jogadores. Sempre executada primeiro em filterscripts. ## Exemplos ```c public OnTrailerUpdate(playerid, vehicleid) { DetachTrailerFromVehicle(GetPlayerVehicleID(playerid)); return 0; } ``` ## Notas :::warning Essa callback é executada com frequência por segundo e por trailer. Você deve evitar realizar grandes operações de gravação e leitura de arquivos. ::: ## Funções Relacionadas - [GetVehicleTrailer](../functions/GetVehicleTrailer): Verifica qual trailer está engatado no veículo. - [IsTrailerAttachedToVehicle](../functions/IsTrailerAttachedToVehicle): Verifica se há um trailer engatado ao veículo. - [AttachTrailerToVehicle](../functions/AttachTrailerToVehicle): Engata o trailer ao veículo. - [DetachTrailerFromVehicle](../functions/DetachTrailerFromVehicle): Desengata o trailer do veículo.
openmultiplayer/web/docs/translations/pt-BR/scripting/callbacks/OnTrailerUpdate.md/0
{ "file_path": "openmultiplayer/web/docs/translations/pt-BR/scripting/callbacks/OnTrailerUpdate.md", "repo_id": "openmultiplayer", "token_count": 542 }
404
--- title: ChangeVehiclePaintjob description: Altere o paintjob de um veículo (para cores normais, consulte ChangeVehicleColor). tags: ["vehicle"] --- ## Descrição Altere o paintjob de um veículo (para cores normais, consulte ChangeVehicleColor). | Nome | Descrição | | ---------- | ----------------------------------------------------------- | | vehicleid | O ID do veículo para alterar o paintjob. | | paintjobid | O ID do paintjob a aplicar. Use 3 para remover um paintjob. | ## Retorno Esta função sempre retorna 1 (sucesso), mesmo que o veículo não exista. :::warning Se a cor do veículo for preta, o paintjob pode não ser visível. É melhor deixar o veículo branco antes de aplicar o paintjob, usando ChangeVehicleColor(vehicleid,1,1); ::: ## Exemplos ```c new rand = random(3); // Será 0, 1 ou 2 (todos válidos) ChangeVehicleColor(GetPlayerVehicleID(playerid),1,1); // Certifique-se que é branco para um resultado melhor. ChangeVehiclePaintjob(GetPlayerVehicleID(playerid), rand); // Altera o paintjob para um aleatório, do atual veículo do jogador. ``` ## Funções Relacionadas - [ChangeVehicleColor](ChangeVehicleColor.md): Define a cor de um veículo. - [OnVehiclePaintjob](../callbacks/OnVehiclePaintjob.md): É chamado quando o paintjob de um veículo é alterado.
openmultiplayer/web/docs/translations/pt-BR/scripting/functions/ChangeVehiclePaintjob.md/0
{ "file_path": "openmultiplayer/web/docs/translations/pt-BR/scripting/functions/ChangeVehiclePaintjob.md", "repo_id": "openmultiplayer", "token_count": 535 }
405
--- title: GangZoneStopFlashForPlayer description: Pare uma Gangzone de piscar para um jogador. tags: ["player", "gangzone"] --- ## Descrição Pare uma Gangzone de piscar para um jogador. | Nome | Descrição | | -------- | ------------------------------------------------------- | | playerid | O ID do jogador para o qual parar de piscar a gangzone. | | zone | O ID da gangzone que quer parar de piscar. | ## Retorno Esta função não retorna nenhum valor específico. ## Exemplos ```c new gGangZoneId; public OnGameModeInit() { gGangZoneId = GangZoneCreate(1248.011, 2072.804, 1439.348, 2204.319); return 1; } public OnPlayerSpawn(playerid) { GangZoneFlashForPlayer(playerid, gGangZoneId, COLOR_RED); return 1; } public OnPlayerEnterVehicle(playerid, vehicleid) { GangZoneStopFlashForPlayer(playerid, gGangZoneId); return 1; } ``` ## Funções Relacionadas - [GangZoneCreate](GangZoneCreate): Cria uma gangzone. - [GangZoneDestroy](GangZoneDestroy): Destrói uma gangzone. - [GangZoneShowForPlayer](GangZoneShowForPlayer): Mostra uma gangzone a um jogador. - [GangZoneShowForAll](GangZoneShowForAll): Mostra uma gangzone para todos os jogadores. - [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. - [GangZoneStopFlashForAll](GangZoneStopFlashForAll): Pare uma Gangzone de piscar para todos os jogadores.
openmultiplayer/web/docs/translations/pt-BR/scripting/functions/GangZoneStopFlashForPlayer.md/0
{ "file_path": "openmultiplayer/web/docs/translations/pt-BR/scripting/functions/GangZoneStopFlashForPlayer.md", "repo_id": "openmultiplayer", "token_count": 662 }
406
--- title: ResetPlayerMoney description: Resetar o dinheiro de um jogador para $0. tags: ["player"] --- ## Descrição Resetar o dinheiro de um jogador para \$0. | Nome | Descrição | | -------- | ------------------------------------------- | | playerid | O ID do jogador do qual resetar o dinheiro. | ## Retorno 1: A função foi executada com sucesso. 0: A função falhou ao ser executada. Isso significa que o jogador não está conectado. ## Exemplos ```c public OnPlayerDeath(playerid, killerid, WEAPON:reason) { SendClientMessage(playerid, 0xFFFFFFAA, "Você morreu e perdeu todo o seu dinheiro!"); ResetPlayerMoney(playerid); return 1; } ``` ## Funções Relacionadas - [GetPlayerMoney](GetPlayerMoney.md): Retorna quanto dinheiro um jogador tem. - [GivePlayerMoney](GivePlayerMoney.md): Dê dinheiro a um jogador.
openmultiplayer/web/docs/translations/pt-BR/scripting/functions/ResetPlayerMoney.md/0
{ "file_path": "openmultiplayer/web/docs/translations/pt-BR/scripting/functions/ResetPlayerMoney.md", "repo_id": "openmultiplayer", "token_count": 341 }
407
--- title: gettime description: Retorna o horário atual do servidor, aonde será guardado nas variáveis &hora, &minuto e &segundo. tags: [] --- <LowercaseNote /> ## Descrição Retorna o horário atual do servidor, aonde será guardado nas variáveis &hora, &minuto e &segundo. | Name | Descrição | | ---------- | -------------------------------------------------------------- | | &hora=0 | A variável para armazenar a hora, passada por referência. | | &minuto=0 | A variável para armazenar o minuto, passada por referência. | | &segundo=0 | A variável para armazenar os segundos, passada por referência. | ## Retorno A própria função se retorna em Unix Timestamp. ## Exemplos ```c new horas, minutos, segundos, timestamp; timestamp = gettime(horas, minutos, segundos); printf("%02d:%02d:%02d", horas, minutos, segundos); printf("Segundos desde meia noite de 1º de Janeiro de 1970: %d", timestamp); ``` ## Notas :::tip Esta função é útil para medir intervalos de tempo usando suas características de timestamp. Isso pode ser particularmente útil se você quiser restringir algumas funcionalidades com base em um tempo (por exemplo, um comando que só pode ser executado a cada 30 segundos). Usando esse método, você não precisa depender de timers. ::: ## Funções Relacionadas - [getdate](getdate): Retorna a data atual do servidor.
openmultiplayer/web/docs/translations/pt-BR/scripting/functions/gettime.md/0
{ "file_path": "openmultiplayer/web/docs/translations/pt-BR/scripting/functions/gettime.md", "repo_id": "openmultiplayer", "token_count": 578 }
408
--- title: "Controlando um Servidor" description: Comandos úteis para gerenciar um servidor. --- ## Mudando o Gamemode ### Rodando um gamemode customizado/baixado - Abra o diretório em que você instalou o servidor (ex: /Rockstar Games/GTA San Andreas/server) - Pegue o arquivo .amx baixado/compilado e coloque-o na pasta gamemodes onde você instalou o servidor. - Use RCON para mudar de modo como descrito acima (2.1) - Como alternativa você pode adicionar um novo modo para a rotação, também descrito acima (2.3) ### Usando Filterscripts O mesmo que rodar um gamemode customizado, exceto: - Coloque o .amx em uma pasta chamada `filterscripts` - Adicione o seguinte no server.cfg `filterscripts <scriptname>` ## Colocando senha no seu servidor - Se você desejar, poderá adicionar uma senha para que apenas seus amigos possam entrar, adicione isso ao seu server.cfg ``` password qualquercoisa ``` - Isso irá fazer com que seu servidor contenha uma senha para acessar, que colocamos como 'qualquercoisa', mude-a como desejar. - Você também pode mudar a senha enquanto estiver no jogo usando `/rcon password novasenhaaqui` - Você pode remover a senha usando `/rcon password 0`, ou reiniciando o servidor. ## Usando RCON ### Logando Você pode logar quando estiver no jogo, basta escrever `/rcon login senha`, ou quando estiver fora do jogo usando a RCON no Console Remoto. A senha é a mesma que você colocou no server.cfg ### Colocando Banimentos ##### samp.ban samp.ban é o arquivo usado para organizar banimentos, incluindo as seguintes informações sobre o mesmo: - IP - Data - Tempo - Nome (Nome da pessoa ou motivo, veja [BanEx](../functions/BanEx)) - Tipo de ban Para adicionar um banido, basta colocar uma linha como esta: ``` IP_AQUI [28/05/09 | 13:37:00] JOGADOR - INGAME BAN ``` Onde `IP_AQUI` é onde você coloca o IP que gostaria de banir. ##### Função Ban() A função de [Ban](../functions/Ban) pode ser usada para banir um jogador de um script. O [BanEx](../functions/BanEx) irá adicionar uma opção como esta: ``` 13.37.13.37 [28/05/09 | 13:37:00] Cheater - BANIMENTO NO JOGO ``` ##### RCON Comando de Banimento O comando de banimento do RCON, executado escrevendo /rcon ban in-game ou "ban" no console, é usado para banir um jogador específico que está no seu servidor, para banir um IP veja a próxima seção. Simplesmente escreva: ``` # No Jogo: /rcon ban PLAYERID # Console: ban PLAYERID ``` ##### Banimento por IP O comando de banir por IP do RCON, executado escrevendo /rcon banip in-game ou "banip" no console, é usado para banir um endereço de IP específico, para banir um jogador do servidor por IP veja a seção anterior. Simplesmente escreva: ``` # No Jogo: /rcon banip IP # Console: banip IP ``` ### Removendo Banimentos Uma vez que alguém é banido, há duas maneiras de desabnir o mesmo. - Remover do samp.ban - O comando `unbanip` do RCON #### samp.ban samp.ban pode ser encontrado no diretório do seu servidor, ele contém linhas com as seguintes informações sobre cada banimento - IP - Data - Tempo - Nome (Nome do jogador ou motivo (veja [BanEx](../../functions/BanEx))) - Tipo do banimento (INGAME, IP BAN etc,) Exemplos: ``` 127.8.57.32 [13/06/09 | 69:69:69] NONE - IP BAN 13.37.13.37 [28/05/09 | 13:37:00] Kyeman - INGAME BAN ``` Para desbanir alguém, simplesmente remova a linha, então execute o comando do RCON "reloadbans" para fazer com que o servidor faça a leitura novamente do arquivo. #### unbanip O comando de "unbanip" do RCON pode ser usado no jogo ou no console do servidor. Para desbanir um IP, siplesmente digite `/rcon unbanip IP_AQUI` caso esteja no jogo, ou `unbanip IP_AQUI` no console. Exemplo: ``` 13.37.13.37 [28/05/09 | 13:37:00] Kyeman - INGAME BAN ``` ``` # No jogo: /rcon unbanip 13.37.13.37 # Console: unbanip 13.37.13.37 ``` Para desbanir alguém, simplesmente use `unbanip`, então execute o comando do RCON "reloadbans" para fazer com que o servidor faça a leitura novamente do arquivo. #### reloadbans `samp.ban` é um arquivo que contém informações dos IP's que já foram banidos do servidor. Este arquivo é lido quando o servidor é iniciado. então caso desbane um IP/Jogador você PRECISA digitar no RCON `reloadbans` para fazer com que o servidor leia novamente o arquivo, permitindo com que os jogadores desbanidos entrem no servidor. ### Comandos do RCON Digite cmdlist para comandos (ou, varlist para variáveis) dando assim uso ao RCON no jogo (`/rcon cmdlist`). Estas são as funções que você como admin pode usar: | Comando | Descrição | | --------------------------------- | --------------------------------------------------------------------------------------------------- | | `/rcon cmdlist` | Mostra a lista de comandos. | | `/rcon varlist` | Mostra a lista com as variáveis atuais. | | `/rcon exit` | Fecha o servidor. | | `/rcon echo [text]` | Mostra o `[text]` no console do servidor (NÃO no console do jogador). | | `/rcon hostname [name]` | Muda o nome da host (_exemplo: /rcon hostname meu servidor_). | | `/rcon gamemodetext [name]` | Muda o texto do gamemode (_exemplo: /rcon gamemodetext minha GM_). | | `/rcon mapname [name]` | Muda o nome do mapa (_exemplo: /rcon mapname San Andreas_). | | `/rcon exec [filename]` | Executa o arquivo que contém o server.cfg (_exemplo: /rcon exec blah.cfg_). | | `/rcon kick [ID]` | Kick o jogador de determinado ID (_exemplo: /rcon kick 2_). | | `/rcon ban [ID]` | Bane o jogador de determinado ID (_exemplo: /rcon ban 2_). | | `/rcon changemode [mode]` | Este comando irá alternar entre as gamemode's (_exemplo: /rcon changemode sftdm_). | | `/rcon gmx` | Irá carregar a próxima gamemode no server.cfg. | | `/rcon reloadbans` | Carrega e reliza uma nova leitura do samp.ban | | `/rcon reloadlog` | Carrega novamente o server_log.txt. | | `/rcon say` | Mostra uma mensagem no console dos jogadores (\_exemplo: `/rcon say olá` irá mostrar `Admin: olá`). | | `/rcon players` | Mostra os jogadores que estão no servidor (Com nome, IP e ping). | | `/rcon banip [IP]` | Bane determinado IP (_exemplo: /rcon banip 127.0.0.1_). | | `/rcon unbanip [IP]` | Desbane determinado IP (_exemplo: /rcon unbanip 127.0.0.1_). | | `/rcon gravity` | Muda a gravidade (_exemplo: /rcon gravity 0.008_). | | `/rcon weather [ID]` | Muda o clima (_exemplo: /rcon weather 1_). | | `/rcon loadfs` | Carrega o determinado filterscript (_exemplo: /rcon loadfs adminfs_). | | `/rcon weburl [server url]` | Muda o URL do servidor no cliente | | `/rcon unloadfs` | Descarrega o determinado filterscript (_exemplo: /rcon unloadfs adminfs_). | | `/rcon reloadfs` | Recarrega o determinado filterscript (_exemplo: /rcon reloadfs adminfs_). | | `/rcon rcon\_password [PASSWORD]` | Muda a senha do RCON | | `/rcon password [password]` | Coloca/Reseta a senha do servidor | | `/rcon messageslimit [count]` | Muda o número e mensagens por segundo que um jogador pode enviar. (padrão: 500) | | `/rcon ackslimit [count]` | Muda o limite de acks (padrão: 3000) | | `/rcon messageholelimit [count]` | Muda o limite dos "buracos" na mensagem: (padrão: 3000) | | `/rcon playertimeout [limit m/s]` | Muda o tempo em milisegundos quando um jogador cai. (padrão: 1000) | | `/rcon language [language]` | Muda a língua do servidor (_example: /rcon language English_). | ### Funções e Callbacks relacionadas #### Callbacks - [OnRconLoginAttempt](../../callbacks/OnRconLoginAttempt): Chamado quando há uma tentativa de logar no RCON. #### Functions - [IsPlayerAdmin](../../functions/IsPlayerAdmin): Verifica se um jogador está logado no RCON. - [SendRconCommand](../../functions/SendRconCommand): Envia um comando para o RCON via código.
openmultiplayer/web/docs/translations/pt-BR/server/ControllingServer.md/0
{ "file_path": "openmultiplayer/web/docs/translations/pt-BR/server/ControllingServer.md", "repo_id": "openmultiplayer", "token_count": 4731 }
409
--- titlu: OnGameModeInit descriere: Acest callback este apelat atunci când gamemode-ul a pornit. tags: [] --- ## Descriere Acest callback este apelat atunci când gamemode-ul a pornit. ## Exemple ```c public OnGameModeInit() { print("Gamemode pornit!"); return 1; } ``` ## Note :::tip Această funcție poate fi utilizată și într-un filterscript pentru a detecta dacă gamemode-ul se modifică cu comenzi RCON precum changemode sau gmx, deoarece schimbarea de gamemode nu reîncarcă filterscript-ul. ::: ## Funcții relatate
openmultiplayer/web/docs/translations/ro/scripting/callbacks/OnGameModeInit.md/0
{ "file_path": "openmultiplayer/web/docs/translations/ro/scripting/callbacks/OnGameModeInit.md", "repo_id": "openmultiplayer", "token_count": 229 }
410
--- title: OnPlayerExitVehicle description: Acest callback este apelat atunci când un jucător începe să părăsească un vehicul. tags: ["player", "vehicle"] --- ## Descriere Acest callback este apelat atunci când un jucător începe să părăsească un vehicul. | Nume | Descriere | | --------- | ----------------------------------------------- | | playerid | ID-ul jucătorului care iese dintr-un vehicul. | | vehicleid | ID-ul vehiculului din care iese jucătorul. | ## Returnări Este întotdeauna numit primul în filterscript-uri. ## Exemple ```c public OnPlayerExitVehicle(playerid, vehicleid) { new string[35]; format(string, sizeof(string), "INFO: Ieși din vehiculul %i", vehicleid); SendClientMessage(playerid, 0xFFFFFFFF, string); return 1; } ``` ## Note :::warning Nu este apelat dacă jucătorul cade de pe bicicletă sau este scos dintr-un vehicul prin alte mijloace, cum ar fi utilizarea SetPlayerPos. Trebuie să utilizați OnPlayerStateChange și să verificați dacă starea lor veche este PLAYER_STATE_DRIVER sau PLAYER_STATE_PASSENGER și dacă noua lor stare este PLAYER_STATE_ONFOOT. ::: ## Funcții similare - [RemovePlayerFromVehicle](../functions/RemovePlayerFromVehicle): Aruncă un jucător din vehiculul lor. - [GetPlayerVehicleSeat](../functions/GetPlayerVehicleSeat): Verificați pe ce loc se află un jucător.
openmultiplayer/web/docs/translations/ro/scripting/callbacks/OnPlayerExitVehicle.md/0
{ "file_path": "openmultiplayer/web/docs/translations/ro/scripting/callbacks/OnPlayerExitVehicle.md", "repo_id": "openmultiplayer", "token_count": 604 }
411
--- title: OnPlayerSpawn description: Acest callback este apelat atunci când apare un jucător. tags: ["player"] --- ## Descriere Acest callback este apelat atunci când apare un jucător. | Name | Descriere | | -------- | ---------------------------------- | | playerid | ID-ul jucătorului care a apărut. | ## Returnări 0 - Va împiedica alte filterscript-uri să primească acest callback. 1 - Indică faptul că acest apel invers va fi transmis următorului filterscript. Este întotdeauna numit primul în filterscript-uri. ## Exemple ```c public OnPlayerSpawn(playerid) { new PlayerName[MAX_PLAYER_NAME], string[40]; GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); format(string, sizeof(string), "%s a apărut cu succes.", PlayerName); SendClientMessageToAll(0xFFFFFFFF, string); return 1; } ``` ## Note :::tip Jocul scade uneori \$100 de la jucători după apariție. ::: ## Funcții similare - [SpawnPlayer](../functions/SpawnPlayer): Forțați un jucător să apară. - [AddPlayerClass](../functions/AddPlayerClass): Adăugați o clasă. - [SetSpawnInfo](../functions/SetSpawnInfo): Setați setarea de apariție pentru un jucător.
openmultiplayer/web/docs/translations/ro/scripting/callbacks/OnPlayerSpawn.md/0
{ "file_path": "openmultiplayer/web/docs/translations/ro/scripting/callbacks/OnPlayerSpawn.md", "repo_id": "openmultiplayer", "token_count": 504 }
412
--- title: OnVehiclePaintjob description: Apelat atunci când un jucător previzualizează o vopsire a unui vehicul într-un magazin de mod. tags: ["vehicle"] --- ## Descriere Apelat atunci când un jucător previzualizează o vopsire a unui vehicul într-un magazin de mod. | Nume | Descriere | | ---------- | ---------------------------------------------------------------- | | playerid | ID-ul jucătorului care a schimbat vopsirea vehiculului său. | | vehicleid | ID-ul vehiculului căruia i s-a schimbat lucrările de vopsire. | | paintjobid | ID-ul noii lucrări de vopsire. | ## Returnări Este întotdeauna numit primul în modul de joc, astfel încât returnarea 0 acolo blochează alte filterscript-uri să-l vadă. ## Exemple ```c public OnVehiclePaintjob(playerid, vehicleid, paintjobid) { new string[128]; format(string, sizeof(string), "Ați modificat vopsirea vehiculului dvs. la %d!", paintjobid); SendClientMessage(playerid, 0x33AA33AA, string); return 1; } ``` ## Note :::tip Acest apel invers nu este apelat de ChangeVehiclePaintjob. Puteți utiliza OnVehicleChangePaintjob de la vSync pentru a ști când jucătorul cumpără lucrarea. ::: ## Funcții similare - [ChangeVehiclePaintjob](../functions/ChangeVehiclePaintjob): Schimbați vopsirea unui vehicul. - [ChangeVehicleColor](../functions/ChangeVehicleColor): Setați culoarea unui vehicul. - [OnVehicleRespray](OnVehicleRespray): apelat atunci când un vehicul este pulverizat. - [OnVehicleMod](OnVehicleMod): Apelat atunci când un vehicul este modificat.
openmultiplayer/web/docs/translations/ro/scripting/callbacks/OnVehiclePaintjob.md/0
{ "file_path": "openmultiplayer/web/docs/translations/ro/scripting/callbacks/OnVehiclePaintjob.md", "repo_id": "openmultiplayer", "token_count": 734 }
413
--- title: AllowAdminTeleport description: Această funcție va determina dacă administratorii RCON vor fi teleportați la punctul lor de cale atunci când vor seta unul. tags: [] --- :::warning Această funcție, începând cu 0.3d, este depreciată. Vă rugăm să consultați [OnPlayerClickMap](../callbacks/OnPlayerClickMap.md). ::: ## Descriere Această funcție va determina dacă administratorii RCON vor fi teleportați la punctul lor de cale atunci când vor seta unul. | Nume | Descriere | | ----- | ------------------------------------------ | | allow | 0 pentru a dezactiva și 1 pentru a activa. | ## Se intoarce Această funcție nu returnează valori specifice. ## Exemple ```c public OnGameModeInit() { AllowAdminTeleport(1); // Other stuff return 1; } ``` ## Funcții conexe - [IsPlayerAdmin](IsPlayerAdmin.md): Verifică dacă un jucător este conectat la RCON. - [AllowPlayerTeleport](AllowPlayerTeleport.md): Comutați teleportarea punctelor de parcurs pentru jucători.
openmultiplayer/web/docs/translations/ro/scripting/functions/AllowAdminTeleport.md/0
{ "file_path": "openmultiplayer/web/docs/translations/ro/scripting/functions/AllowAdminTeleport.md", "repo_id": "openmultiplayer", "token_count": 431 }
414
--- title: Ghid pentru pickup-uri --- Un scurt tutorial care descrie modul de utilizare a pickup-urilor. ## Definiți pickup-ul Primul lucru care trebuie făcut atunci când creezi pickup-uri este crearea unui loc unde să-ți stochezi ID-ul. Acest lucru se va face într-o variabilă globală, astfel încât să poată fi setat atunci când creați preluarea și să citiți când ridicați o preluare, apelând un apel invers cu ID-ul preluării pe care ați preluat-o. Pentru acest exemplu vom folosi numele "gMyPickup". ```c new gMyPickup; ``` ## Crearea pickup-ului Există două moduri de a crea pickup-uri. [CreatePickup](../scripting/functions/CreatePickup) și [AddStaticPickup](../scripting/functions/AddStaticPickup). AddStaticPickup nu returnează un ID atunci când este creat, nu poate fi distrus și poate fi folosit numai sub OnGameModeInit, așa că pentru acest exemplu vom folosi [CreatePickup](../scripting/functions/CreatePickup). ** Sintaxa pentru [CreatePickup](../scripting/functions/CreatePickup) este: ** ** Parametri: ** | model | Modelul pe care doriți să îl utilizați pentru preluare. | | ------------ | ------------------------------------------------------------------------------------------------------------- | | type | Tipul de reproducere a spawnului, consultați mai jos această pagină. | | Float:X | Coordonata X pentru afișarea preluării. | | Float:Y | Coordonata Y pentru afișarea preluării. | | Float:Z | Coordonata Z pentru afișarea preluării. | | Virtualworld | ID-ul lumii virtuale a ridicării. O valoare -1 va determina ridicarea să se afișeze în toate lumile virtuale. | Pentru acest exemplu, vom crea o ridicare în numerar la Grove Street. Acum trebuie să decidem cu privire la un model care să apară în lume, există o mulțime de modele din care să alegem, unele sunt listate pe site-ul extern [aici](https://dev.prineside.com/en/gtasa_samp_model_id), aici alegeți numărul de model 1274 care este semnul dolarului. În cele din urmă, avem nevoie de un [Tip](../../../scripting/resources/pickuptypes) pentru preluare, pe aceeași pagină cu modelele de preluare este o listă de tipuri de preluare care descrie diferitele unii o fac. Vrem ca această preluare să dispară atunci când o ridicați, astfel încât să nu o puteți ridica în mod repetat, dar să reapară după câteva minute, astfel încât să o puteți ridica din nou, tipul 2 face exact acest lucru. Pickup-urile sunt create cel mai frecvent la pornirea scriptului, în [OnGameModeInit](../scripting/callbacks/OnGameModeInit) sau [OnFilterScriptInit](../scripting/callbacks/OnFilterScriptInit) în funcție de tipul de script, totuși acesta poate merge în orice funcție (de exemplu, puteți crea un script de scădere a armei care ar folosi OnPlayerDeath pentru a crea preluări de arme). Iată deci codul pentru a crea preluarea noastră și pentru a stoca ID-ul în „gMyPickup”: ```c gMyPickup = CreatePickup(1274, 2, 2491.7900, -1668.1653, 13.3438, -1); ``` ### Alegerea a ceea ce face Când ridicați un pickup, se apelează [OnPlayerPickUpPickup](../scripting/callbacks/OnPlayerPickUpPickup), trecând playerid (jucătorul care a preluat un pickup) și pickupid (ID-ul pickup-ului care a fost ridicat). Unele tipuri de pickup sunt proiectate să funcționeze automat, deci nu este nevoie să faceți nimic în OnPlayerPickUpPickup. Pentru mai multe informații, consultați pagina [tipuri de pickupuri](../scripting/resources/pickuptypes). Când un jucător ridică noul nostru pick-up, vrem să le dăm 100 \$, pentru a face acest lucru mai întâi trebuie să verificăm dacă au ridicat pick-ul nostru în dolari și nu unul diferit. Când am făcut asta, le putem oferi cei 100 de dolari: ```c public OnPlayerPickUpPickup(playerid, pickupid) { // Check that the pickup ID of the pickup they picked up is gMyPickup if(pickupid == gMyPickup) { // Message the player SendClientMessage(playerid, 0xFFFFFFFF, "You received $100!"); // Give the player the money GivePlayerMoney(playerid, 100); } // if you need to add more pickups, simply do this: else if (pickupid == (some other pickup)) { // Another pickup, do something else } return 1; } ``` Felicitări, acum știi cum să creezi și să gestionezi pickup-uri! ## Folositor Puteți utiliza [Streamer](https://github.com/samp-incognito/samp-streamer-plugin) plugin pentru a crea pickup-uri nelimitate cu CreateDynamicPickup.
openmultiplayer/web/docs/translations/ro/tutorials/PickupGuide.md/0
{ "file_path": "openmultiplayer/web/docs/translations/ro/tutorials/PickupGuide.md", "repo_id": "openmultiplayer", "token_count": 2105 }
415
--- title: OnDialogResponse description: Этот коллбэк вызывается, когда игрок взаимодействует с диалогом, показанным ему через ShowPlayerDialog. tags: [] --- <VersionWarn name='callback' version='SA-MP 0.3.7' /> ## Описание Этот коллбэк вызывается, когда игрок взаимодействует с диалогом, показанным ему через ShowPlayerDialog. | Аргумент | Описание | | ----------- | ----------------------------------------------------------------------------------------------------------------------- | | playerid | ID игрока, взаимодействующего с диалогом. | | dialogid | ID диалога, показанного через ShowPlayerDialog, с которым взаимодействует игрок. | | response | 1 - нажатие на левую кнопку диалога (Enter), 0 нажатие на правую кнопку диалога (ESC) (всегда 1, если показана только 1 кнопка) | | listitem | ID элемента списка, выбранного игроком (начинается с 0) (если у диалога выбран стиль списка, иначе всегда будет -1). | | inputtext[] | Текст, введённый игроком в диалог или текст элемента списка, если у диалога выбран стиль списка. | ## Результат Коллбэк всегда срабатывает в filterscript'ах первее, поэтому `return 1` не позволяет другим фильтрскриптам вызвать этот коллбэк ## Пример ```c // Макрос ID диалога, с которым будет взаимодействие #define DIALOG_RULES 1 // В каком-либо месте кода ShowPlayerDialog(playerid, DIALOG_RULES, DIALOG_STYLE_MSGBOX, "Правила сервера", "- Нет читам!\n- Не спамить\n- Уважать администрации\n\nВы принимаете данные правила?", "Да", "Нет"); public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if (dialogid == DIALOG_RULES) { if (response) // Если игрок нажал на 'Да' или нажал Enter { SendClientMessage(playerid, COLOR_GREEN, "Thank you for agreeing to the server rules!"); } else // Если игрок нажал на 'Нет' или нажал Esc { Kick(playerid); } return 1; // Мы обработали диалог, поэтому возвращаем 1. Прямо как в OnPlayerCommandText. } return 0; // Вы ДОЛЖНЫ возвращать 0 здесь! Прямо как в OnPlayerCommandText. } #define DIALOG_LOGIN 2 // В каком-либо месте кода ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Авторизация", "Введите ваш пароль:", "Войти", "Отмена"); public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if (dialogid == DIALOG_LOGIN) { if (!response) // Если игрок нажал 'Отмена' или Esc { Kick(playerid); } else // Если игрок нажал 'Войти' или Enter { if (CheckPassword(playerid, inputtext)) { SendClientMessage(playerid, COLOR_RED, "Вы успешно авторизовались!"); } else { SendClientMessage(playerid, COLOR_RED, "НЕ УДАЛОСЬ АВТОРИЗОВАТЬСЯ."); // Показ диалога авторизации заново ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Авторизация", "Введите ваш пароль:", "Войти", "Отмена"); } } return 1; // Мы обработали диалог, поэтому возвращаем 1. Прямо как в OnPlayerCommandText. } return 0; // Вы ДОЛЖНЫ возвращать 0 здесь! Прямо как в OnPlayerCommandText. } #define DIALOG_WEAPONS 3 // In some command ShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_LIST, "Оружие", "Desert Eagle\nAK-47\nБоевой дробовик", "Выбрать", "Закрыть"); public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if (dialogid == DIALOG_WEAPONS) { if (response) // Если игрок нажал 'Выбрать' или сделал двойной клик по оружию { // Выдаём ему оружие switch(listitem) { case 0: GivePlayerWeapon(playerid, WEAPON_DEAGLE, 14); // Выдаём desert eagle case 1: GivePlayerWeapon(playerid, WEAPON_AK47, 120); // Выдаём AK-47 case 2: GivePlayerWeapon(playerid, WEAPON_SHOTGSPA, 28); // Выдаём Боевой дробовик } } return 1; // Мы обработали диалог, поэтому возвращаем 1. Прямо как в OnPlayerCommandText. } return 0;// Вы ДОЛЖНЫ возвращать 0 здесь! Прямо как в OnPlayerCommandText. } #define DIALOG_WEAPONS 3 // In some command ShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_LIST, "Weapons", "Weapon\tAmmo\tPrice\n\ M4\t120\t500\n\ MP5\t90\t350\n\ AK-47\t120\t400", "Выбрать", "Закрыть"); public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if (dialogid == DIALOG_WEAPONS) { if (response) // Если игрок нажал 'Выбрать' или сделал двойной клик по оружию { // Выдаём ему оружие switch(listitem) { case 0: GivePlayerWeapon(playerid, WEAPON_M4, 120); // Выдаём M4 case 1: GivePlayerWeapon(playerid, WEAPON_MP5, 90); // Выдаём MP5 case 2: GivePlayerWeapon(playerid, WEAPON_AK47, 120); // Выдаём AK-47 } } return 1; // Мы обработали диалог, поэтому возвращаем 1. Прямо как в OnPlayerCommandText. } return 0; // Вы ДОЛЖНЫ возвращать 0 здесь! Прямо как в OnPlayerCommandText. } ``` ## Примечания :::tip Параметры могут отличаться в зависимости от стиля диалога ([см. больше примеров](../resources/dialogstyles.md)). ::: :::tip Это нормально переключаться между диалогами, если у вас их много. ::: :::warning Диалог, показанный игроку, не скрывается при рестарте сервера, что приводит к предупреждению: "Warning: PlayerDialogResponse PlayerId: 0 dialog ID doesn't match last sent dialog ID" if a player responded to this dialog after restart." ::: ## Функции - [ShowPlayerDialog](../functions/ShowPlayerDialog.md): Показать диалог игроку.
openmultiplayer/web/docs/translations/ru/scripting/callbacks/OnDialogResponse.md/0
{ "file_path": "openmultiplayer/web/docs/translations/ru/scripting/callbacks/OnDialogResponse.md", "repo_id": "openmultiplayer", "token_count": 4332 }
416
--- title: Туториалы description: Сборник туториалов, помогающих в написании игровых режимов (модов) и управлении вашим сервером. --- В этой секции вы найдёте различные туториалы, помогающие в написании игровых режимов (модов) и управлении вашим сервером. Никакого упорядочивания не предусмотрено.
openmultiplayer/web/docs/translations/ru/tutorials/_.md/0
{ "file_path": "openmultiplayer/web/docs/translations/ru/tutorials/_.md", "repo_id": "openmultiplayer", "token_count": 306 }
417
--- title: OnPlayerClickPlayer description: Kliče se, ko igralec dvakrat klikne na igralca na semaforju (TAB). tags: ["player"] --- ## Opis Kliče se, ko igralec dvakrat klikne na igralca na semaforju (TAB). | Ime | Opis | | --------------- | ---------------------------------------------------- | | playerid | ID igralec, ki je kliknil na igralca na semaforju. | | clickedplayerid | ID igralec, na katerega se klikne. | | source | Vir klika predvajalnika. | ## Returns 1 - Preprečil bo druge "filterskript" prejeli to "callback". 0 - Pomeni, da bo ta "callback" se posreduje na naslednjo "filterskripte". Vedno je bila povabljena prva v "filterscript". ## Primeri ```c public OnPlayerClickPlayer(playerid, clickedplayerid, CLICK_SOURCE:source) { new message[32]; format(message, sizeof(message), "Kliknili ste na predvajalnik %d", clickedplayerid); SendClientMessage(playerid, 0xFFFFFFFF, message); return 1; } ``` ## Opombe :::tip Trenutno je na voljo samo ena 'source' (0 - CLICK_SOURCE_SCOREBOARD). Vztrajnost tega argumenta kaže, da bo v prihodnosti morda podprtih več virov. ::: ## Srodne Funkcijo - [OnPlayerClickTextDraw](OnPlayerClickTextDraw.md): Povabljen, ko igralec klikne risanje besedila.
openmultiplayer/web/docs/translations/sl/scripting/callbacks/OnPlayerClickPlayer.md/0
{ "file_path": "openmultiplayer/web/docs/translations/sl/scripting/callbacks/OnPlayerClickPlayer.md", "repo_id": "openmultiplayer", "token_count": 600 }
418
--- title: DestroyVehicle description: Unistava vozilo. tags: ["vehicle"] --- ## Description Unistava vozilo. Vozilo odmah nestaje. | Name | Description | | --------- | --------------------------- | | vehicleid | ID vozila koje se unistava. | ## Returns 1: Funkcija je uspesno izvrsena. 0: Funkcija nije uspesno izvrsena. Vozilo ne postoji. ## Examples ```c public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp(cmdtext, "/destroyveh", true) == 0) { new vehicleid = GetPlayerVehicleID(playerid); DestroyVehicle(vehicleid); return 1; } return 0; } ``` ## Related Functions - [CreateVehicle](CreateVehicle.md): Kreiraj vozilo. - [RemovePlayerFromVehicle](RemovePlayerFromVehicle.md): Izbaci igraca iz vozila. - [SetVehicleToRespawn](SetVehicleToRespawn.md): Respawn vozila.
openmultiplayer/web/docs/translations/sr/scripting/functions/DestroyVehicle.md/0
{ "file_path": "openmultiplayer/web/docs/translations/sr/scripting/functions/DestroyVehicle.md", "repo_id": "openmultiplayer", "token_count": 357 }
419
--- title: OnIncomingConnection description: Callback นี้ถูกเรียกเมื่อมี IP พยายามเชื่อมต่อมายังเซิร์ฟเวอร์ tags: [] --- ## คำอธิบาย Callback นี้ถูกเรียกเมื่อมี IP พยายามเชื่อมต่อมายังเซิร์ฟเวอร์ หากต้องการบล็อกการเชื่อมต่อที่กำลังเข้ามาให้ใช้ BlockIpAddress | ชื่อ | คำอธิบาย | | ------------ | --------------------------------------- | | playerid | ไอดีของผู้เล่นที่พยายามเชื่อมต่อ | | ip_address[] | ที่อยู่ IP ของผู้เล่นที่พยายามเชื่อมต่อ | | port | พอร์ทของผู้เล่นที่พยายามเชื่อมต่อ | ## ส่งคืน 1 - จะป้องกันไม่ให้ฟิลเตอร์สคริปต์อื่นถูกเรียกโดย Callback นี้ 0 - บอกให้ Callback นี้ส่งต่อไปยังฟิลเตอร์สคริปต์ถัดไป มันถูกเรียกในฟิลเตอร์สคริปต์ก่อนเสมอ ## ตัวอย่าง ```c public OnIncomingConnection(playerid, ip_address[], port) { printf("การเชื่อมต่อผู้เล่นไอดี %i [IP/port: %s:%i]", playerid, ip_address, port); return 1; } ``` ## ฟังก์ชั่นที่เกี่ยวข้องกัน - [BlockIpAddress](../../scripting/functions/BlockIpAddress.md): บล็อกที่อยู่ IP ไม่ให้เชื่อมต่อกับเซิร์ฟเวอร์ตามระยะเวลาที่กำหนด - [UnBlockIpAddress](../../scripting/functions/UnBlockIpAddress.md): ปลดบล็อกที่อยู่ IP จากการบล็อกก่อนหน้านี้
openmultiplayer/web/docs/translations/th/scripting/callbacks/OnIncomingConnection.md/0
{ "file_path": "openmultiplayer/web/docs/translations/th/scripting/callbacks/OnIncomingConnection.md", "repo_id": "openmultiplayer", "token_count": 1387 }
420
--- title: OnPlayerExitedMenu description: Called when a player exits a menu. tags: ["player", "menu"] --- ## คำอธิบาย Called when a player exits a menu. | Name | Description | | -------- | ----------------------------------------- | | playerid | The ID of the player that exited the menu | ## ส่งคืน มันถูกเรียกในเกมโหมดก่อนเสมอ ## ตัวอย่าง ```c public OnPlayerExitedMenu(playerid) { TogglePlayerControllable(playerid,1); // unfreeze the player when they exit a menu return 1; } ``` ## ฟังก์ชั่นที่เกี่ยวข้องกัน - [CreateMenu](../../scripting/functions/CreateMenu.md): Create a menu. - [DestroyMenu](../../scripting/functions/DestroyMenu.md): Destroy a menu.
openmultiplayer/web/docs/translations/th/scripting/callbacks/OnPlayerExitedMenu.md/0
{ "file_path": "openmultiplayer/web/docs/translations/th/scripting/callbacks/OnPlayerExitedMenu.md", "repo_id": "openmultiplayer", "token_count": 377 }
421
--- title: OnPlayerStateChange description: This callback is called when a player changes state. tags: ["player"] --- ## คำอธิบาย This callback is called when a player changes state. For example, when a player changes from being the driver of a vehicle to being on-foot. | Name | Description | | -------- | ---------------------------------------- | | playerid | The ID of the player that changed state. | | newstate | The player's new state. | | oldstate | The player's previous state. | Refer to [Player States](../../scripting/resources/playerstates.md) for a list of all available player states. ## ส่งคืน มันถูกเรียกในฟิลเตอร์สคริปต์ก่อนเสมอ ## ตัวอย่าง ```c public OnPlayerStateChange(playerid, PLAYER_STATE:newstate, PLAYER_STATE:oldstate) { if (oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER) // Player entered a vehicle as a driver { new vehicleid = GetPlayerVehicleID(playerid); AddVehicleComponent(vehicleid, 1010); // Add NOS to the vehicle } return 1; } ``` ## บันทึก :::tip NPC สามารถเรียก Callback นี้ได้ ::: ## ฟังก์ชั่นที่เกี่ยวข้องกัน - [GetPlayerState](../../scripting/functions/GetPlayerState.md): Get a player's current state. - [GetPlayerSpecialAction](../../scripting/functions/GetPlayerSpecialAction.md): Get a player's current special action. - [SetPlayerSpecialAction](../../scripting/functions/SetPlayerSpecialAction.md): Set a player's special action.
openmultiplayer/web/docs/translations/th/scripting/callbacks/OnPlayerStateChange.md/0
{ "file_path": "openmultiplayer/web/docs/translations/th/scripting/callbacks/OnPlayerStateChange.md", "repo_id": "openmultiplayer", "token_count": 687 }
422
--- title: OnVehicleRespray description: This callback is called when a player exits a mod shop, even if the colors weren't changed. tags: ["vehicle"] --- ## คำอธิบาย This callback is called when a player exits a mod shop, even if the colors weren't changed. Watch out, the name is ambiguous, Pay 'n' Spray shops don't call this callback. | Name | Description | | --------- | ------------------------------------------------------------ | | playerid | The ID of the player that is driving the vehicle. | | vehicleid | The ID of the vehicle that was resprayed. | | color1 | The color that the vehicle's primary color was changed to. | | color2 | The color that the vehicle's secondary color was changed to. | ## ส่งคืน It is always called first in gamemode so returning 0 there also blocks other filterscripts from seeing it. ## ตัวอย่าง ```c public OnVehicleRespray(playerid, vehicleid, color1, color2) { new string[48]; format(string, sizeof(string), "You resprayed vehicle %d to colors %d and %d!", vehicleid, color1, color2); SendClientMessage(playerid, COLOR_GREEN, string); return 1; } ``` ## บันทึก :::tip This callback is not called by ChangeVehicleColor. Misleadingly, this callback is not called for pay 'n' spray (only modshops). Fix here: http://pastebin.com/G81da7N1 ::: :::warning Known Bug(s): previewing a component inside a mod shop might call this callback. ::: ## ฟังก์ชั่นที่เกี่ยวข้องกัน - [ChangeVehicleColor](../../scripting/functions/ChangeVehicleColor.md): Set the color of a vehicle. - [ChangeVehiclePaintjob](../../scripting/functions/ChangeVehiclePaintjob.md): Change the paintjob on a vehicle. - [OnVehiclePaintjob](../../scripting/callbacks/OnVehiclePaintjob.md): Called when a vehicle's paintjob is changed. - [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/callbacks/OnVehicleRespray.md/0
{ "file_path": "openmultiplayer/web/docs/translations/th/scripting/callbacks/OnVehicleRespray.md", "repo_id": "openmultiplayer", "token_count": 778 }
423
--- title: AllowInteriorWeapons description: Toggle whether the usage of weapons in interiors is allowed or not. tags: [] --- ## คำอธิบาย Toggle whether the usage of weapons in interiors is allowed or not. | Name | Description | | ----- | ----------------------------------------------------------------------------------------- | | allow | 1 to enable weapons in interiors (enabled by default), 0 to disable weapons in interiors. | ## ส่งคืน This function does not return any specific values. ## ตัวอย่าง ```c public OnGameModeInit() { // This will allow weapons inside interiors. AllowInteriorWeapons(1); return 1; } ``` ## บันทึก :::warning This function does not work in the current SA:MP version! ::: ## ฟังก์ชั่นที่เกี่ยวข้องกัน - [SetPlayerInterior](../../scripting/functions/SetPlayerInterior.md): Set a player's interior. - [GetPlayerInterior](../../scripting/functions/GetPlayerInterior.md): Get the current interior of a player. - [OnPlayerInteriorChange](../../scripting/callbacks/OnPlayerInteriorChange.md): Called when a player changes interior.
openmultiplayer/web/docs/translations/th/scripting/functions/AllowInteriorWeapons.md/0
{ "file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/AllowInteriorWeapons.md", "repo_id": "openmultiplayer", "token_count": 472 }
424
--- title: BlockIpAddress description: Blocks an IP address from further communication with the server for a set amount of time (with wildcards allowed). tags: [] --- ## คำอธิบาย Blocks an IP address from further communication with the server for a set amount of time (with wildcards allowed). Players trying to connect to the server with a blocked IP address will receive the generic "You are banned from this server." message. Players that are online on the specified IP before the block will timeout after a few seconds and, upon reconnect, will receive the same message. | Name | Description | | ---------- | ---------------------------------------------------------------------------------------------------------- | | ip_address | The IP to block. | | timems | The time (in milliseconds) that the connection will be blocked for. 0 can be used for an indefinite block. | ## ส่งคืน This function does not return any specific values. ## ตัวอย่าง ```c public OnRconLoginAttempt(ip[], password[], success) { if (!success) // if they supplied a bad password { BlockIpAddress(ip, 60 * 1000); // block the connections from this ip for one minute } return 1; } ``` ## บันทึก :::tip Wildcards can be used with this function, for example blocking the IP '6.9._._' will block all IPs where the first two octets are 6 and 9 respectively. Any number can be in place of an asterisk. ::: ## ฟังก์ชั่นที่เกี่ยวข้องกัน - [UnBlockIpAddress](../functions/UnBlockIpAddress): Unblock an IP that was previously blocked. - [OnIncomingConnection](../callbacks/OnIncomingConnection): Called when a player is attempting to connect to the server.
openmultiplayer/web/docs/translations/th/scripting/functions/BlockIpAddress.md/0
{ "file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/BlockIpAddress.md", "repo_id": "openmultiplayer", "token_count": 714 }
425
--- title: CreatePickup description: This function does exactly the same as AddStaticPickup, except it returns a pickup ID which can be used to destroy it afterwards and be tracked using OnPlayerPickUpPickup. tags: [] --- ## คำอธิบาย This function does exactly the same as AddStaticPickup, except it returns a pickup ID which can be used to destroy it afterwards and be tracked using OnPlayerPickUpPickup. | Name | Description | | ------------ | --------------------------------------------------------------------------------- | | model | The model of the pickup. | | type | The pickup spawn type. | | Float:X | The X coordinate to create the pickup at. | | Float:Y | The Y coordinate to create the pickup at. | | Float:Z | The Z coordinate to create the pickup at. | | virtualworld | The virtual world ID of the pickup. Use -1 to make the pickup show in all worlds. | ## ส่งคืน The ID of the created pickup, -1 on failure (pickup max limit). ## ตัวอย่าง ```c new pickup; // Create a variable to store the pickup ID in public OnGameModeInit() { pickup = CreatePickup(1242, 2, 1503.3359, 1432.3585, 10.1191, -1); // Create an armour pickup and store the ID in 'pickup' return 1; } // Later.. DestroyPickup(pickup); // Example of using the pickup ID pickup = 0; // pickup variable needs to be reset to avoid future conflicts ``` ## บันทึก :::tip The only type of pickup that can be picked up from inside a vehicle is 14 (except for special pickups such as bribes). Pickups are shown to, and can be picked up by all players. It is possible that if DestroyPickup() is used when a pickup is picked up, more than one player can pick up the pickup, due to lag. This can be circumvented through the use of variables. Certain pickup types come with 'automatic responses', for example using an M4 model in the pickup will automatically give the player the weapon and some ammo. For fully scripted pickups, type 1 should be used. ::: :::warning Known Bug(s): Pickups that have a X or Y lower than -4096.0 or bigger than 4096.0 won't show up and won't trigger OnPlayerPickUpPickup either. ::: ## ฟังก์ชั่นที่เกี่ยวข้องกัน - [AddStaticPickup](../../scripting/functions/AddStaticPickup.md): Add a static pickup. - [DestroyPickup](../../scripting/functions/DestroyPickup.md): Destroy a pickup. - [OnPlayerPickUpPickup](../../scripting/callbacks/OnPlayerPickUpPickup.md): Called when a player picks up a pickup.
openmultiplayer/web/docs/translations/th/scripting/functions/CreatePickup.md/0
{ "file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/CreatePickup.md", "repo_id": "openmultiplayer", "token_count": 1102 }
426
--- title: DisableInteriorEnterExits description: Disable all the interior entrances and exits in the game (the yellow arrows at doors). tags: [] --- ## คำอธิบาย Disable all the interior entrances and exits in the game (the yellow arrows at doors). | Name | Description | | ---- | ----------- | ## ตัวอย่าง ```c public OnGameModeInit() { DisableInteriorEnterExits(); return 1; } ``` ## บันทึก :::tip This function will only work if it has been used BEFORE a player connects (it is recommended to use it in OnGameModeInit). It will not remove a connected player's markers. ::: :::warning If the gamemode is changed after this function has been used, and the new gamemode doesn't disable markers, the markers will NOT reappear for already-connected players (but will for newly connected players). ::: ## ฟังก์ชั่นที่เกี่ยวข้องกัน - [AllowInteriorWeapons](../../scripting/functions/AllowInteriorWeapons.md): Determine if weapons can be used in interiors.
openmultiplayer/web/docs/translations/th/scripting/functions/DisableInteriorEnterExits.md/0
{ "file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/DisableInteriorEnterExits.md", "repo_id": "openmultiplayer", "token_count": 355 }
427
--- title: FindModelFileNameFromCRC description: Find an existing custom skin or simple object model file. tags: [] --- :::warning This function was added in SA-MP 0.3.DL R1 and will not work in earlier versions! ::: ## คำอธิบาย Find an existing custom skin or simple object model file. The model files are located in models server folder by default (artpath setting). | Name | Description | | ----------- | --------------------------------------------------------------------- | | crc | The CRC checksum of custom model file. | | retstr[] | An array into which to store the .dff file name, passed by reference. | | retstr_size | The length of the string that should be stored. | ## ส่งคืน 1: The function executed successfully. 0: The function failed to execute. ## ฟังก์ชั่นที่เกี่ยวข้องกัน - [OnPlayerFinishedDownloading](../callbacks/OnPlayerFinishedDownloading): Called when a player finishes downloading custom models.
openmultiplayer/web/docs/translations/th/scripting/functions/FindModelFileNameFromCRC.md/0
{ "file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/FindModelFileNameFromCRC.md", "repo_id": "openmultiplayer", "token_count": 436 }
428
--- title: GetActorFacingAngle description: Get the facing angle of an actor. tags: [] --- :::warning ฟังก์ชั่นนี้ถูกเพิ่มใน SA-MP 0.3.7 และจะไม่ทำงานในเวอร์ชั่นก่อนหน้านี้! ::: ## คำอธิบาย Get the facing angle of an actor. | Name | Description | | ---------- | ------------------------------------------------------------------------------------------- | | actorid | The ID of the actor to get the facing angle of. Returned by CreateActor. | | &Float:ang | A float variable, passed by reference, in to which the actor's facing angle will be stored. | ## ส่งคืน 1: The function executed successfully. 0: The function failed to execute. The actor specified does not exist. The actor's facing angle is stored in the specified variable. ## ตัวอย่าง ```c new Float:angle; GetActorFacingAngle(actorid, angle); ``` ## ฟังก์ชั่นที่เกี่ยวข้องกัน - [SetActorFacingAngle](../functions/SetActorFacingAngle): Set the facing angle of an actor. - [GetActorPos](../functions/GetActorPos): Get the position of an actor.
openmultiplayer/web/docs/translations/th/scripting/functions/GetActorFacingAngle.md/0
{ "file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/GetActorFacingAngle.md", "repo_id": "openmultiplayer", "token_count": 578 }
429
--- title: GetPVarFloat description: Gets a player variable as a float. tags: ["pvar"] --- ## คำอธิบาย Gets a player variable as a float. | Name | Description | | -------- | ----------------------------------------------------------- | | playerid | The ID of the player whose player variable you want to get. | | varname | The name of the player variable. | ## ส่งคืน The float from the specified player variable ## ตัวอย่าง ```c forward LoadPos(playerid); public LoadPos(playerid) { SetPlayerPos(playerid, GetPVarFloat(playerid,"xpos"), GetPVarFloat(playerid,"ypos"), GetPVarFloat(playerid,"zpos")); return 1; } ``` ## บันทึก :::tip Variables aren't reset until after OnPlayerDisconnect is called, so the values are still accessible in OnPlayerDisconnect. ::: ## ฟังก์ชั่นที่เกี่ยวข้องกัน - SetPVarInt: Set an integer for a player variable. - GetPVarInt: Get the previously set integer from a player variable. - SetPVarString: Set a string for a player variable. - GetPVarString: Get the previously set string from a player variable. - SetPVarFloat: Set a float for a player variable. - DeletePVar: Delete a player variable.
openmultiplayer/web/docs/translations/th/scripting/functions/GetPVarFloat.md/0
{ "file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/GetPVarFloat.md", "repo_id": "openmultiplayer", "token_count": 510 }
430
--- title: GetPlayerCameraTargetPlayer description: Allows you to retrieve the ID of the player the playerid is looking at. tags: ["player"] --- :::warning ฟังก์ชั่นนี้ถูกเพิ่มใน SA-MP 0.3.7 และจะไม่ทำงานในเวอร์ชั่นก่อนหน้านี้! ::: ## คำอธิบาย Allows you to retrieve the ID of the player the playerid is looking at. | Name | Description | | -------- | ----------------------------- | | playerid | The ID of the player to check | ## ส่งคืน The ID of the player the playerid is looking at ## ตัวอย่าง ```c new playerTarget = GetPlayerCameraTargetPlayer(playerid); if (IsPlayerAdmin(playerTarget)) { GameTextForPlayer(playerid, "Looking at an admin", 3000, 3); } ``` ## บันทึก :::warning Do not confuse this function with GetPlayerTargetPlayer. GetPlayerTargetPlayer returns the ID of the player playerid is aming at (with a weapon). GetPlayerCameraTargetPlayer returns the ID of the player playerid is looking at (reference point is the center of the screen). ::: ## ฟังก์ชั่นที่เกี่ยวข้องกัน - [GetPlayerCameraTargetActor](../functions/GetPlayerCameraTargetActor): Get the ID of the actor (if any) 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/GetPlayercameraFrontVector): Get the player's camera front vector
openmultiplayer/web/docs/translations/th/scripting/functions/GetPlayerCameraTargetPlayer.md/0
{ "file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/GetPlayerCameraTargetPlayer.md", "repo_id": "openmultiplayer", "token_count": 632 }
431
--- title: GetPlayerMenu description: Gets the ID of the menu the player is currently viewing (shown by ShowMenuForPlayer). tags: ["player", "menu"] --- ## คำอธิบาย Gets the ID of the menu the player is currently viewing (shown by ShowMenuForPlayer). | Name | Description | | -------- | ------------------------------------------------ | | playerid | The ID of the player to get the current menu of. | ## ส่งคืน The ID of the player's currently shown menu, or INVALID_MENU (255) if no menu shown. Value returned is tagged with Menu:. ## ตัวอย่าง ```c new Menu:CurrentMenu = GetPlayerMenu(playerid); // Store the player's current menu in 'CurrentMenu' ``` ## บันทึก :::tip Returns previous menu when none is displayed. ::: ## ฟังก์ชั่นที่เกี่ยวข้องกัน - ShowMenuForPlayer: Show a menu for a player. - HideMenuForPlayer: Hide a menu for a player. - CreateMenu: Create a menu. - DestroyMenu: Destroy a menu. - AddMenuItem: Add an item to a menu. - OnPlayerSelectedMenuRow: Called when a player selected a row in a menu. - OnPlayerExitedMenu: Called when a player exits a menu.
openmultiplayer/web/docs/translations/th/scripting/functions/GetPlayerMenu.md/0
{ "file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/GetPlayerMenu.md", "repo_id": "openmultiplayer", "token_count": 446 }
432
--- title: GetPlayerTargetActor description: Gets id of an actor which is aimed by certain player. tags: ["player"] --- :::warning ฟังก์ชั่นนี้ถูกเพิ่มใน SA-MP 0.3.7 และจะไม่ทำงานในเวอร์ชั่นก่อนหน้านี้! ::: ## คำอธิบาย Gets id of an actor which is aimed by certain player. | Name | Description | | -------- | ------------------------------------------ | | playerid | The ID of the player to get the target of. | ## ส่งคืน The ID of the targeted actor, or INVALID_ACTOR_ID if none. ## ตัวอย่าง ```c public OnPlayerUpdate(playerid) { new actorid = GetPlayerTargetActor(playerid); new string[32]; format(string, sizeof(string), "You are aiming at actor id %d", actorid); SendClientMessage(playerid, -1, string); return 1; } ``` ## บันทึก :::warning Does not work for joypads/controllers, and after a certain distance. Does not work for the sniper rifle, as it doesn't lock on to anything and as such can't and won't return a player. ::: ## ฟังก์ชั่นที่เกี่ยวข้องกัน - GetPlayerCameraTargetActor: Get the ID of the actor (if any) a player is looking at. - GetPlayerCameraFrontVector: Get the player's camera front vector - OnPlayerGiveDamageActor: This callback is called when a player gives damage to an actor.
openmultiplayer/web/docs/translations/th/scripting/functions/GetPlayerTargetActor.md/0
{ "file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/GetPlayerTargetActor.md", "repo_id": "openmultiplayer", "token_count": 606 }
433
--- title: GetSVarString description: Gets a string 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 a string server variable's value. | Name | Description | | ------------- | ------------------------------------------------------------------------------ | | varname | The name of the server variable (case-insensitive). Assigned in SetSVarString. | | string_return | The array in which to store the string value in, passed by reference. | | len | The maximum length of the returned string. | ## ส่งคืน The length of the string. ## ตัวอย่าง ```c // set "Version" SetSVarString("Version", "0.3.7"); // will print version that server has new string[5 + 1]; GetSVarString("Version", string, sizeof(string)); printf("Version: %s", string); ``` ## ฟังก์ชั่นที่เกี่ยวข้องกัน - SetSVarInt: Set an integer for a server variable. - GetSVarInt: Get a player server as an integer. - SetSVarString: Set a string for 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/GetSVarString.md/0
{ "file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/GetSVarString.md", "repo_id": "openmultiplayer", "token_count": 560 }
434
--- title: GetVehicleParamsCarWindows description: Allows you to retrieve the current state of a vehicle's windows. tags: ["vehicle"] --- :::warning This function was added in SA-MP 0.3.7 and will not work in earlier versions! ::: ## คำอธิบาย Allows you to retrieve the current state of a vehicle's windows | Name | Description | | ---------- | ------------------------------------------------------------------------- | | vehicleid | The ID of the vehicle | | &driver | The integer to save the state of the drivers window to. | | &passenger | The integer to save the state of the passengers window to. | | &backleft | The integer to save the state of the rear left window to (if available). | | &backright | The integer to save the state of the rear right window to (if available). | ## ส่งคืน The vehicle's windows state is stored in the specified variables. ## บันทึก :::tip The values returned in each variable are as follows: -1: Window state not set (generally closed, unless set explicitly to -1) 0: Open 1: Closed ::: ## ฟังก์ชั่นที่เกี่ยวข้องกัน - SetVehicleParamsCarWindows: Open and close the windows of a vehicle. - GetVehicleParamsCarDoors: Retrive the current state of a vehicle's doors. - SetVehicleParamsCarDoors: Open and close the doors of a vehicle.
openmultiplayer/web/docs/translations/th/scripting/functions/GetVehicleParamsCarWindows.md/0
{ "file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/GetVehicleParamsCarWindows.md", "repo_id": "openmultiplayer", "token_count": 581 }
435
--- title: InterpolateCameraPos description: Move a player's camera from one position to another, within the set time. tags: [] --- ## คำอธิบาย Move a player's camera from one position to another, within the set time. Useful for scripted cut scenes | Name | Description | | ----------- | ----------------------------------------------------------------------------------------------------------------------- | | playerid | The ID of the player the camera should be moved for | | Float:FromX | The X position the camera should start to move from | | Float:FromY | The Y position the camera should start to move from | | Float:FromZ | The Z position the camera should start to move from | | Float:ToX | The X position the camera should move to | | Float:ToY | The Y position the camera should move to | | Float:ToZ | The Z position the camera should move to | | time | Time in milliseconds | | cut | The [jumpcut](../resources/cameracutstyles.md) to use. Defaults to CAMERA_CUT. Set to CAMERA_MOVE for a smooth movement | ## ส่งคืน This function does not return any specific values. ## ตัวอย่าง ```c public OnPlayerCommandText(playerid, cmdtext[]) { if (!strcmp(cmdtext, "/moveme", true)) { TogglePlayerSpectating(playerid, 1); InterpolateCameraPos(playerid, 0.0, 0.0, 10.0, 1000.0, 1000.0, 30.0, 10000, CAMERA_MOVE); //Move the player's camera from point A to B in 10000 milliseconds (10 seconds). return 1; } return 0; } ``` ## บันทึก :::tip Use TogglePlayerSpectating to make objects stream in for the player while the camera is moving and remove the HUD. The player's camera can be reset to behind the player with SetCameraBehindPlayer. ::: ## ฟังก์ชั่นที่เกี่ยวข้องกัน - [InterpolateCameraLookAt](../../scripting/functions/InterpolateCameraLookAt.md): Move a player's camera view from one location to another. - [SetPlayerCameraPos](../../scripting/functions/SetPlayerCameraPos.md): Set a player's camera position. - [SetPlayerCameraLookAt](../../scripting/functions/SetPlayerCameraLookAt.md): Set where a player's camera should face.
openmultiplayer/web/docs/translations/th/scripting/functions/InterpolateCameraPos.md/0
{ "file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/InterpolateCameraPos.md", "repo_id": "openmultiplayer", "token_count": 1450 }
436
--- title: IsValidActor description: Checks if an actor ID is valid. tags: [] --- :::warning ฟังก์ชั่นนี้ถูกเพิ่มใน SA-MP 0.3.7 และจะไม่ทำงานในเวอร์ชั่นก่อนหน้านี้! ::: ## คำอธิบาย Checks if an actor ID is valid. | Name | Description | | ------- | ----------------------------- | | actorid | The ID of the actor to check. | ## ส่งคืน 1 - The actor is valid. 0 - The actor is not valid. ## ตัวอย่าง ```c new MyActor; public OnGameModeInit() { MyActor = CreateActor(179, 316.1, -134.0, 999.6, 90.0); // Actor as a salesperson in Ammunation. if (IsValidActor(MyActor)) { SetActorHealth(MyActor, 100); } return 1; } ``` ## ฟังก์ชั่นที่เกี่ยวข้องกัน - [CreateActor](../../scripting/functions/CreateActor.md): Create an actor. - [GetActorPoolSize](../../scripting/functions/GetActorPoolSize.md): Gets the highest actorid created on the server. - [SetActorHealth](../../scripting/functions/SetActorHealth.md): Set the health of an actor.
openmultiplayer/web/docs/translations/th/scripting/functions/IsValidActor.md/0
{ "file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/IsValidActor.md", "repo_id": "openmultiplayer", "token_count": 546 }
437
--- title: NetStats_GetConnectedTime description: Gets the amount of time (in milliseconds) that a player has been connected to the server for. tags: [] --- ## คำอธิบาย Gets the amount of time (in milliseconds) that a player has been connected to the server for. | Name | Description | | -------- | -------------------------------------------------- | | playerid | The ID of the player to get the connected time of. | ## ส่งคืน This function returns the amount of time (in milliseconds) that a player has been connected to the server for. 0 is returned if the player is not connected. ## ตัวอย่าง ```c public OnPlayerCommandText(playerid,cmdtext[]) { if (!strcmp(cmdtext, "/connectedtime")) { new szString[144]; format(szString, sizeof(szString), "You have been connected for %i milliseconds.", NetStats_GetConnectedTime(playerid)); SendClientMessage(playerid, -1, szString); } return 1; } ``` ## บันทึก :::tip The return value is not reset to zero after changing the game mode (using the RCON command "gmx"). ::: ## ฟังก์ชั่นที่เกี่ยวข้องกัน - [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_MessagesReceived](../functions/NetStats_MessagesReceived.md): Get the number of network messages the server has received from the player. - [NetStats_BytesReceived](../functions/NetStats_BytesReceived.md): Get the amount of information (in bytes) that the server has received from the player. - [NetStats_MessagesSent](../functions/NetStats_MessagesSent): Get the number of network messages the server has sent to the player. - [NetStats_BytesSent](../functions/NetStats_BytesSent.md): Get the amount of information (in bytes) that the server has sent to the player. - [NetStats_MessagesRecvPerSecond](../functions/NetStats_MessagesRecvPerSecond.md): Get the number of network messages the server has received from the player in the last second. - [NetStats_PacketLossPercent](../functions/NetStats_PacketLossPercent.md): Get a player's packet loss percent. - [NetStats_ConnectionStatus](../functions/NetStats_ConnectionStatus.md): Get a player's connection status. - [NetStats_GetIpPort](../functions/NetStats_GetIpPort.md): Get a player's IP and port.
openmultiplayer/web/docs/translations/th/scripting/functions/NetStats_GetConnectedTime.md/0
{ "file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/NetStats_GetConnectedTime.md", "repo_id": "openmultiplayer", "token_count": 829 }
438
--- title: PlayerTextDrawFont description: Change the font of a player-textdraw. tags: ["player", "textdraw", "playertextdraw"] --- ## คำอธิบาย Change the font of a player-textdraw. | Name | Description | | -------- | ----------------------------------------------------------------------------------------------------------------------------------------- | | playerid | The ID of the player whose player-textdraw to change the font of | | text | The ID of the player-textdraw to change the font of | | font | There are four font styles as shown below. A font value greater than 3 does not display, and anything greater than 16 crashes the client. | Available Styles: ![Available Styles](images/textdraws/Textdraw_font_styles.png) Available Fonts: ![Available Fonts](images/textdraws/Textdraw_Fonts.png) ## ส่งคืน This function does not return any specific values. ## ตัวอย่าง ```c new PlayerText:welcomeText[MAX_PLAYERS]; public OnPlayerConnect(playerid) { // First, create the textdraw welcomeText[playerid] = CreatePlayerTextDraw(playerid, 240.0, 580.0, "Welcome to my SA-MP server"); // Set the font of player-textdraw 'welcomeText' to 2. PlayerTextDrawFont(playerid, welcomeText[playerid], 2); ``` ## ฟังก์ชั่นที่เกี่ยวข้องกัน - CreatePlayerTextDraw: Create a player-textdraw. - PlayerTextDrawDestroy: Destroy a player-textdraw. - PlayerTextDrawColor: Set the color of the text in a player-textdraw. - PlayerTextDrawBoxColor: Set the color of a player-textdraw's box. - PlayerTextDrawBackgroundColor: Set the background color of a player-textdraw. - PlayerTextDrawAlignment: Set the alignment of a player-textdraw. - 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/PlayerTextDrawFont.md/0
{ "file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/PlayerTextDrawFont.md", "repo_id": "openmultiplayer", "token_count": 1016 }
439
--- title: RemovePlayerAttachedObject description: Remove an attached object from a player. tags: ["player"] --- ## คำอธิบาย Remove an attached object from a player. | Name | Description | | -------- | --------------------------------------------------------------------- | | playerid | The ID of the player to remove the object from. | | index | The index of the object to remove (set with SetPlayerAttachedObject). | ## ส่งคืน 1 on success, 0 on failure. ## ตัวอย่าง ```c public OnPlayerCommandText(playerid, cmdtext[]) { if (!strmp(cmdtext, "/remao", true)) // Remove Attached Objects { for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++) { if (IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i); } return 1; } return 0; } ``` ## ฟังก์ชั่นที่เกี่ยวข้องกัน - [SetPlayerAttachedObject](../functions/SetPlayerAttachedObject.md): Attach an object to a player - [IsPlayerAttachedObjectSlotUsed](../functions/IsPlayerAttachedObjectSlotUsed.md): Check whether an object is attached to a player in a specified index
openmultiplayer/web/docs/translations/th/scripting/functions/RemovePlayerAttachedObject.md/0
{ "file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/RemovePlayerAttachedObject.md", "repo_id": "openmultiplayer", "token_count": 532 }
440
--- title: SendRconCommand description: Sends an RCON (Remote Console) command. tags: ["administration"] --- ## คำอธิบาย Sends an RCON (Remote Console) command. | Name | Description | | --------- | -------------------------------- | | command[] | The RCON command to be executed. | ## ส่งคืน This function always returns 1. ## บันทึก :::warning - Does not support login, due to the lack of a 'playerid' parameter. - 'password 0' will remove the server's password if one is set. - This function will result in OnRconCommand being called. ::: ## ตัวอย่าง ```c SendRconCommand("gmx"); // This is a scripted version of typing "/rcon gmx" in-game. // GMX restarts the game mode. // Example using format() new szMapName[] = "Los Santos"; new szCmd[64]; format(szCmd, sizeof(szCmd), "mapname %s", szMapName); SendRconCommand(szCmd); ``` ## ฟังก์ชั่นที่เกี่ยวข้องกัน - IsPlayerAdmin: Checks if a player is logged into RCON. ## Related Callbacks - OnRconCommand: Called when an RCON command is sent. - OnRconLoginAttempt: Called when an attempt to login to RCON is made.
openmultiplayer/web/docs/translations/th/scripting/functions/SendRconCommand.md/0
{ "file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/SendRconCommand.md", "repo_id": "openmultiplayer", "token_count": 459 }
441
--- title: SetObjectRot description: Set the rotation of an object on the three axes (X, Y and Z). tags: [] --- ## คำอธิบาย Set the rotation of an object on the three axes (X, Y and Z). | Name | Description | | ---------- | -------------------------------------------- | | objectid | The ID of the object to set the rotation of. | | Float:RotX | The X rotation. | | Float:RotY | The Y rotation. | | Float:RotZ | The Z rotation. | ## ส่งคืน This function always returns 1, even if the object doesn't exist. ## ตัวอย่าง ```c SetObjectRot(objectid, 45, 90, 180); ``` ## ฟังก์ชั่นที่เกี่ยวข้องกัน - CreateObject: Create an object. - DestroyObject: Destroy an object. - IsValidObject: Checks if a certain object is vaild. - MoveObject: Move an object. - StopObject: Stop an object from moving. - SetObjectPos: Set the position of an object. - GetObjectPos: Locate an object. - GetObjectRot: Check the rotation of an object. - AttachObjectToPlayer: Attach an object to a player. - CreatePlayerObject: Create an object for only one player. - DestroyPlayerObject: Destroy a player object. - IsValidPlayerObject: Checks if a certain player object is vaild. - MovePlayerObject: Move a player object. - StopPlayerObject: Stop a player object from moving. - SetPlayerObjectPos: Set the position of a player object. - SetPlayerObjectRot: Set the rotation of a player object. - GetPlayerObjectPos: Locate a player object. - GetPlayerObjectRot: Check the rotation of a player object. - AttachPlayerObjectToPlayer: Attach a player object to a player.
openmultiplayer/web/docs/translations/th/scripting/functions/SetObjectRot.md/0
{ "file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/SetObjectRot.md", "repo_id": "openmultiplayer", "token_count": 646 }
442
--- title: SetPlayerFightingStyle description: Set a player's special fighting style. tags: ["player"] --- ## คำอธิบาย Set a player's special fighting style. To use in-game, aim and press the 'secondary attack' key (ENTER by default). | Name | Description | | -------- | ------------------------------------------------------------------------ | | playerid | The ID of player to set the fighting style of. | | style | The fighting [style](../resources/fightingstyles.md) that should be set. | ## ส่งคืน This function does not return any specific values. ## ตัวอย่าง ```c if (strcmp(cmdtext, "/boxing", true) == 0) { SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING); SendClientMessage(playerid, 0xFFFFFFAA, "You have changed your fighting style to boxing!"); return 1; } ``` ## บันทึก :::tip This does not affect normal fist attacks - only special/secondary attacks (aim + press 'secondary attack' key). ::: ## ฟังก์ชั่นที่เกี่ยวข้องกัน - GetPlayerFightingStyle: Get a player's fighting style.
openmultiplayer/web/docs/translations/th/scripting/functions/SetPlayerFightingStyle.md/0
{ "file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/SetPlayerFightingStyle.md", "repo_id": "openmultiplayer", "token_count": 478 }
443
--- title: SetPlayerShopName description: Loads or unloads an interior script for a player (for example the ammunation menu). tags: ["player"] --- ## คำอธิบาย Loads or unloads an interior script for a player (for example the ammunation menu). | Name | Description | | ---------- | ------------------------------------------------------------ | | playerid | The ID of the player to load the interior script for. | | shopname[] | The shop script to load. Leave blank ("") to unload scripts. | ## ส่งคืน This function does not return any specific values. ## ตัวอย่าง ```c public OnPlayerCommandText(playerid, cmdtext[]) { if (!strcmp("/enter", cmdtext)) { SetPlayerInterior(playerid, 5); SetPlayerPos(playerid, 372.5565, -131.3607, 1001.4922); SetPlayerShopName(playerid,"FDPIZA"); SendClientMessage(playerid,0xFFFFFFFF,"Welcome to Pizza Stack!"); return 1; } return 0; } ``` ## บันทึก :::tip This function does not support casino scripts. ::: ## ฟังก์ชั่นที่เกี่ยวข้องกัน - DisableInteriorEnterExits: Disable the yellow door markers. - SetPlayerInterior: Set a player's interior.
openmultiplayer/web/docs/translations/th/scripting/functions/SetPlayerShopName.md/0
{ "file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/SetPlayerShopName.md", "repo_id": "openmultiplayer", "token_count": 533 }
444