Portal SAMP
[Ajuda] Converter comando - Versão de Impressão

+- Portal SAMP (https://portalsamp.com)
+-- Fórum: SA-MP (https://portalsamp.com/forumdisplay.php?fid=5)
+--- Fórum: Área de suporte (https://portalsamp.com/forumdisplay.php?fid=6)
+--- Tópico: [Ajuda] Converter comando (/showthread.php?tid=2688)



Converter comando - Tonnob - 20/08/2022

Olá tô com um sistema de celular
Só que quero converter ele
Pra zcmd pq e a include que uso
Aguem pode fazer pra min agradeço



Vídeo mostrado, https://youtu.be/IVaRZ5j1L2c

Download do celular.
https://www.mediafire.com/file/pqgbmnt6f2sitl2/celular.rar/file


RE: Converter comando - White_Blue - 20/08/2022

É bem simples é só fazer como no código abaixo.



Código PHP:
CMD:celular(playerid)
{
Cell[playerid][0] = CreatePlayerTextDraw(playerid120.000000194.000000"ld_poke:cd1d");
PlayerTextDrawFont(playeridCell[playerid][0], 4);
PlayerTextDrawLetterSize(playeridCell[playerid][0], 0.6000002.000000);
PlayerTextDrawTextSize(playeridCell[playerid][0], 82.000000162.000000);
PlayerTextDrawSetOutline(playeridCell[playerid][0], 1);
PlayerTextDrawSetShadow(playeridCell[playerid][0], 0);
PlayerTextDrawAlignment(playeridCell[playerid][0], 1);
PlayerTextDrawColor(playeridCell[playerid][0], -1);
PlayerTextDrawBackgroundColor(playeridCell[playerid][0], 255);
PlayerTextDrawBoxColor(playeridCell[playerid][0], 50);
PlayerTextDrawUseBox(playeridCell[playerid][0], 1);
PlayerTextDrawSetProportional(playeridCell[playerid][0], 1);
PlayerTextDrawSetSelectable(playeridCell[playerid][0], 0);

Cell[playerid][1] = CreatePlayerTextDraw(playerid121.000000199.000000"ld_poke:cd1d");
PlayerTextDrawFont(playeridCell[playerid][1], 4);
PlayerTextDrawLetterSize(playeridCell[playerid][1], 0.6000002.000000);
PlayerTextDrawTextSize(playeridCell[playerid][1], 80.000000152.500000);
PlayerTextDrawSetOutline(playeridCell[playerid][1], 0);
PlayerTextDrawSetShadow(playeridCell[playerid][1], 4);
PlayerTextDrawAlignment(playeridCell[playerid][1], 1);
PlayerTextDrawColor(playeridCell[playerid][1], 255);
PlayerTextDrawBackgroundColor(playeridCell[playerid][1], 255);
PlayerTextDrawBoxColor(playeridCell[playerid][1], 50);
PlayerTextDrawUseBox(playeridCell[playerid][1], 1);
PlayerTextDrawSetProportional(playeridCell[playerid][1], 0);
PlayerTextDrawSetSelectable(playeridCell[playerid][1], 0);

Cell[playerid][2] = CreatePlayerTextDraw(playerid124.000000202.000000"vehicle:vehicleenvmap128");
PlayerTextDrawFont(playeridCell[playerid][2], 4);
PlayerTextDrawLetterSize(playeridCell[playerid][2], 0.6000002.000000);
PlayerTextDrawTextSize(playeridCell[playerid][2], 73.500000145.500000);
PlayerTextDrawSetOutline(playeridCell[playerid][2], 1);
PlayerTextDrawSetShadow(playeridCell[playerid][2], 0);
PlayerTextDrawAlignment(playeridCell[playerid][2], 1);
PlayerTextDrawColor(playeridCell[playerid][2], -1);
PlayerTextDrawBackgroundColor(playeridCell[playerid][2], 255);
PlayerTextDrawBoxColor(playeridCell[playerid][2], 50);
PlayerTextDrawUseBox(playeridCell[playerid][2], 1);
PlayerTextDrawSetProportional(playeridCell[playerid][2], 1);
PlayerTextDrawSetSelectable(playeridCell[playerid][2], 0);

Cell[playerid][3] = CreatePlayerTextDraw(playerid139.000000227.000000"00:00");
PlayerTextDrawFont(playeridCell[playerid][3], 1);
PlayerTextDrawLetterSize(playeridCell[playerid][3], 0.4041661.750000);
PlayerTextDrawTextSize(playeridCell[playerid][3], 400.00000017.000000);
PlayerTextDrawSetOutline(playeridCell[playerid][3], 0);
PlayerTextDrawSetShadow(playeridCell[playerid][3], 1);
PlayerTextDrawAlignment(playeridCell[playerid][3], 1);
PlayerTextDrawColor(playeridCell[playerid][3], -1);
PlayerTextDrawBackgroundColor(playeridCell[playerid][3], 255);
PlayerTextDrawBoxColor(playeridCell[playerid][3], 50);
PlayerTextDrawUseBox(playeridCell[playerid][3], 0);
PlayerTextDrawSetProportional(playeridCell[playerid][3], 1);
PlayerTextDrawSetSelectable(playeridCell[playerid][3], 0);

Cell[playerid][4] = CreatePlayerTextDraw(playerid139.000000218.000000"SABADO");
PlayerTextDrawFont(playeridCell[playerid][4], 1);
PlayerTextDrawLetterSize(playeridCell[playerid][4], 0.3499991.099997);
PlayerTextDrawTextSize(playeridCell[playerid][4], 400.00000017.000000);
PlayerTextDrawSetOutline(playeridCell[playerid][4], 0);
PlayerTextDrawSetShadow(playeridCell[playerid][4], 0);
PlayerTextDrawAlignment(playeridCell[playerid][4], 1);
PlayerTextDrawColor(playeridCell[playerid][4], -1);
PlayerTextDrawBackgroundColor(playeridCell[playerid][4], 255);
PlayerTextDrawBoxColor(playeridCell[playerid][4], 50);
PlayerTextDrawUseBox(playeridCell[playerid][4], 0);
PlayerTextDrawSetProportional(playeridCell[playerid][4], 1);
PlayerTextDrawSetSelectable(playeridCell[playerid][4], 0);

Cell[playerid][5] = CreatePlayerTextDraw(playerid125.000000328.000000"HUD:radar_waypoint");
PlayerTextDrawFont(playeridCell[playerid][5], 4);
PlayerTextDrawLetterSize(playeridCell[playerid][5], 0.2583321.750000);
PlayerTextDrawTextSize(playeridCell[playerid][5], 12.00000018.000000);
PlayerTextDrawSetOutline(playeridCell[playerid][5], 1);
PlayerTextDrawSetShadow(playeridCell[playerid][5], 0);
PlayerTextDrawAlignment(playeridCell[playerid][5], 2);
PlayerTextDrawColor(playeridCell[playerid][5], -1);
PlayerTextDrawBackgroundColor(playeridCell[playerid][5], 255);
PlayerTextDrawBoxColor(playeridCell[playerid][5], 200);
PlayerTextDrawUseBox(playeridCell[playerid][5], 1);
PlayerTextDrawSetProportional(playeridCell[playerid][5], 1);
PlayerTextDrawSetSelectable(playeridCell[playerid][5], 1);

Cell[playerid][6] = CreatePlayerTextDraw(playerid186.000000330.000000"HUD:radar_savegame");
PlayerTextDrawFont(playeridCell[playerid][6], 4);
PlayerTextDrawLetterSize(playeridCell[playerid][6], 0.2583321.750000);
PlayerTextDrawTextSize(playeridCell[playerid][6], 10.00000013.500000);
PlayerTextDrawSetOutline(playeridCell[playerid][6], 1);
PlayerTextDrawSetShadow(playeridCell[playerid][6], 0);
PlayerTextDrawAlignment(playeridCell[playerid][6], 2);
PlayerTextDrawColor(playeridCell[playerid][6], -1);
PlayerTextDrawBackgroundColor(playeridCell[playerid][6], 255);
PlayerTextDrawBoxColor(playeridCell[playerid][6], 200);
PlayerTextDrawUseBox(playeridCell[playerid][6], 1);
PlayerTextDrawSetProportional(playeridCell[playerid][6], 1);
PlayerTextDrawSetSelectable(playeridCell[playerid][6], 1);

Cell[playerid][7] = CreatePlayerTextDraw(playerid154.000000345.000000"ld_pool:nib");
PlayerTextDrawFont(playeridCell[playerid][7], 4);
PlayerTextDrawLetterSize(playeridCell[playerid][7], 0.2583321.750000);
PlayerTextDrawTextSize(playeridCell[playerid][7], 13.00000014.000000);
PlayerTextDrawSetOutline(playeridCell[playerid][7], 1);
PlayerTextDrawSetShadow(playeridCell[playerid][7], 0);
PlayerTextDrawAlignment(playeridCell[playerid][7], 2);
PlayerTextDrawColor(playeridCell[playerid][7], -1);
PlayerTextDrawBackgroundColor(playeridCell[playerid][7], 255);
PlayerTextDrawBoxColor(playeridCell[playerid][7], 200);
PlayerTextDrawUseBox(playeridCell[playerid][7], 1);
PlayerTextDrawSetProportional(playeridCell[playerid][7], 1);
PlayerTextDrawSetSelectable(playeridCell[playerid][7], 1);
for(new 
t8t++)
{
PlayerTextDrawShow(playeridCell[playerid][t]);
}
SelectTextDraw(playerid0x00FF00AA);
return 
1;


Uma dica: eu deixei como estava no script criando a TextDraw quando se executa o comando, mas o recomendado é que o código de criação da TextDraw fique na OnPlayerConnect.


RE: Converter comando - Tonnob - 20/08/2022

(20/08/2022 14:11)White_Blue Escreveu: É bem simples é só fazer como no código abaixo.

Vlw só tirei o pH código pra copiar pq no mobile nn da

CMD:celular(playerid)
{
Cell[playerid][0] = CreatePlayerTextDraw(playerid, 120.000000, 194.000000, "ld_poke:cd1d");
PlayerTextDrawFont(playerid, Cell[playerid][0], 4);
PlayerTextDrawLetterSize(playerid, Cell[playerid][0], 0.600000, 2.000000);
PlayerTextDrawTextSize(playerid, Cell[playerid][0], 82.000000, 162.000000);
PlayerTextDrawSetOutline(playerid, Cell[playerid][0], 1);
PlayerTextDrawSetShadow(playerid, Cell[playerid][0], 0);
PlayerTextDrawAlignment(playerid, Cell[playerid][0], 1);
PlayerTextDrawColor(playerid, Cell[playerid][0], -1);
PlayerTextDrawBackgroundColor(playerid, Cell[playerid][0], 255);
PlayerTextDrawBoxColor(playerid, Cell[playerid][0], 50);
PlayerTextDrawUseBox(playerid, Cell[playerid][0], 1);
PlayerTextDrawSetProportional(playerid, Cell[playerid][0], 1);
PlayerTextDrawSetSelectable(playerid, Cell[playerid][0], 0);

Cell[playerid][1] = CreatePlayerTextDraw(playerid, 121.000000, 199.000000, "ld_poke:cd1d");
PlayerTextDrawFont(playerid, Cell[playerid][1], 4);
PlayerTextDrawLetterSize(playerid, Cell[playerid][1], 0.600000, 2.000000);
PlayerTextDrawTextSize(playerid, Cell[playerid][1], 80.000000, 152.500000);
PlayerTextDrawSetOutline(playerid, Cell[playerid][1], 0);
PlayerTextDrawSetShadow(playerid, Cell[playerid][1], 4);
PlayerTextDrawAlignment(playerid, Cell[playerid][1], 1);
PlayerTextDrawColor(playerid, Cell[playerid][1], 255);
PlayerTextDrawBackgroundColor(playerid, Cell[playerid][1], 255);
PlayerTextDrawBoxColor(playerid, Cell[playerid][1], 50);
PlayerTextDrawUseBox(playerid, Cell[playerid][1], 1);
PlayerTextDrawSetProportional(playerid, Cell[playerid][1], 0);
PlayerTextDrawSetSelectable(playerid, Cell[playerid][1], 0);

Cell[playerid][2] = CreatePlayerTextDraw(playerid, 124.000000, 202.000000, "vehicle:vehicleenvmap128");
PlayerTextDrawFont(playerid, Cell[playerid][2], 4);
PlayerTextDrawLetterSize(playerid, Cell[playerid][2], 0.600000, 2.000000);
PlayerTextDrawTextSize(playerid, Cell[playerid][2], 73.500000, 145.500000);
PlayerTextDrawSetOutline(playerid, Cell[playerid][2], 1);
PlayerTextDrawSetShadow(playerid, Cell[playerid][2], 0);
PlayerTextDrawAlignment(playerid, Cell[playerid][2], 1);
PlayerTextDrawColor(playerid, Cell[playerid][2], -1);
PlayerTextDrawBackgroundColor(playerid, Cell[playerid][2], 255);
PlayerTextDrawBoxColor(playerid, Cell[playerid][2], 50);
PlayerTextDrawUseBox(playerid, Cell[playerid][2], 1);
PlayerTextDrawSetProportional(playerid, Cell[playerid][2], 1);
PlayerTextDrawSetSelectable(playerid, Cell[playerid][2], 0);

Cell[playerid][3] = CreatePlayerTextDraw(playerid, 139.000000, 227.000000, "00:00");
PlayerTextDrawFont(playerid, Cell[playerid][3], 1);
PlayerTextDrawLetterSize(playerid, Cell[playerid][3], 0.404166, 1.750000);
PlayerTextDrawTextSize(playerid, Cell[playerid][3], 400.000000, 17.000000);
PlayerTextDrawSetOutline(playerid, Cell[playerid][3], 0);
PlayerTextDrawSetShadow(playerid, Cell[playerid][3], 1);
PlayerTextDrawAlignment(playerid, Cell[playerid][3], 1);
PlayerTextDrawColor(playerid, Cell[playerid][3], -1);
PlayerTextDrawBackgroundColor(playerid, Cell[playerid][3], 255);
PlayerTextDrawBoxColor(playerid, Cell[playerid][3], 50);
PlayerTextDrawUseBox(playerid, Cell[playerid][3], 0);
PlayerTextDrawSetProportional(playerid, Cell[playerid][3], 1);
PlayerTextDrawSetSelectable(playerid, Cell[playerid][3], 0);

Cell[playerid][4] = CreatePlayerTextDraw(playerid, 139.000000, 218.000000, "SABADO");
PlayerTextDrawFont(playerid, Cell[playerid][4], 1);
PlayerTextDrawLetterSize(playerid, Cell[playerid][4], 0.349999, 1.099997);
PlayerTextDrawTextSize(playerid, Cell[playerid][4], 400.000000, 17.000000);
PlayerTextDrawSetOutline(playerid, Cell[playerid][4], 0);
PlayerTextDrawSetShadow(playerid, Cell[playerid][4], 0);
PlayerTextDrawAlignment(playerid, Cell[playerid][4], 1);
PlayerTextDrawColor(playerid, Cell[playerid][4], -1);
PlayerTextDrawBackgroundColor(playerid, Cell[playerid][4], 255);
PlayerTextDrawBoxColor(playerid, Cell[playerid][4], 50);
PlayerTextDrawUseBox(playerid, Cell[playerid][4], 0);
PlayerTextDrawSetProportional(playerid, Cell[playerid][4], 1);
PlayerTextDrawSetSelectable(playerid, Cell[playerid][4], 0);

Cell[playerid][5] = CreatePlayerTextDraw(playerid, 125.000000, 328.000000, "HUD:radar_waypoint");
PlayerTextDrawFont(playerid, Cell[playerid][5], 4);
PlayerTextDrawLetterSize(playerid, Cell[playerid][5], 0.258332, 1.750000);
PlayerTextDrawTextSize(playerid, Cell[playerid][5], 12.000000, 18.000000);
PlayerTextDrawSetOutline(playerid, Cell[playerid][5], 1);
PlayerTextDrawSetShadow(playerid, Cell[playerid][5], 0);
PlayerTextDrawAlignment(playerid, Cell[playerid][5], 2);
PlayerTextDrawColor(playerid, Cell[playerid][5], -1);
PlayerTextDrawBackgroundColor(playerid, Cell[playerid][5], 255);
PlayerTextDrawBoxColor(playerid, Cell[playerid][5], 200);
PlayerTextDrawUseBox(playerid, Cell[playerid][5], 1);
PlayerTextDrawSetProportional(playerid, Cell[playerid][5], 1);
PlayerTextDrawSetSelectable(playerid, Cell[playerid][5], 1);

Cell[playerid][6] = CreatePlayerTextDraw(playerid, 186.000000, 330.000000, "HUD:radar_savegame");
PlayerTextDrawFont(playerid, Cell[playerid][6], 4);
PlayerTextDrawLetterSize(playerid, Cell[playerid][6], 0.258332, 1.750000);
PlayerTextDrawTextSize(playerid, Cell[playerid][6], 10.000000, 13.500000);
PlayerTextDrawSetOutline(playerid, Cell[playerid][6], 1);
PlayerTextDrawSetShadow(playerid, Cell[playerid][6], 0);
PlayerTextDrawAlignment(playerid, Cell[playerid][6], 2);
PlayerTextDrawColor(playerid, Cell[playerid][6], -1);
PlayerTextDrawBackgroundColor(playerid, Cell[playerid][6], 255);
PlayerTextDrawBoxColor(playerid, Cell[playerid][6], 200);
PlayerTextDrawUseBox(playerid, Cell[playerid][6], 1);
PlayerTextDrawSetProportional(playerid, Cell[playerid][6], 1);
PlayerTextDrawSetSelectable(playerid, Cell[playerid][6], 1);

Cell[playerid][7] = CreatePlayerTextDraw(playerid, 154.000000, 345.000000, "ld_pool:nib");
PlayerTextDrawFont(playerid, Cell[playerid][7], 4);
PlayerTextDrawLetterSize(playerid, Cell[playerid][7], 0.258332, 1.750000);
PlayerTextDrawTextSize(playerid, Cell[playerid][7], 13.000000, 14.000000);
PlayerTextDrawSetOutline(playerid, Cell[playerid][7], 1);
PlayerTextDrawSetShadow(playerid, Cell[playerid][7], 0);
PlayerTextDrawAlignment(playerid, Cell[playerid][7], 2);
PlayerTextDrawColor(playerid, Cell[playerid][7], -1);
PlayerTextDrawBackgroundColor(playerid, Cell[playerid][7], 255);
PlayerTextDrawBoxColor(playerid, Cell[playerid][7], 200);
PlayerTextDrawUseBox(playerid, Cell[playerid][7], 1);
PlayerTextDrawSetProportional(playerid, Cell[playerid][7], 1);
PlayerTextDrawSetSelectable(playerid, Cell[playerid][7], 1);
for(new t; t < 8; t++)
{
PlayerTextDrawShow(playerid, Cell[playerid][t]);
}
SelectTextDraw(playerid, 0x00FF00AA);
return 1;
}


Uma dica: eu deixei como estava no script criando a TextDraw quando se executa o comando, mas o recomendado é que o código de criação da TextDraw fique na OnPlayerConnect.