[AJUDA] Coloca nome em objetos - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [AJUDA] Coloca nome em objetos (
/showthread.php?tid=548737)
[AJUDA] Coloca nome em objetos -
SrGabriel - 02.12.2014
Bom queria sabe como faiz pra por nomes tipo /grade ai na grande vai fica o nome tipo * Grade criada por tal
print de um exemplo:
https://fbcdn-sphotos-h-a.akamaihd.n...42e504267f05c9
Re: [AJUDA] Coloca nome em objetos -
Gii - 02.12.2014
https://sampwiki.blast.hk/wiki/Create3DTextLabel
Onde as coordenadas x, y, z serгo as mesmas do objeto.
Basicamente:
pawn Код:
if ( !strcmp(cmdtext, "/grade") ) {
new Float:Pos[3];
new meuNome[24];
new string[42];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
GetPlayerName(playerid, meuNome, 24);
format(string, sizeof string, "Grade criada por %s", meuNome);
CreateObject(/*modelid*/, Pos[0], Pos[1], Pos[2], /*Float:rX*/, /*Float:rY*/, /*Float:rZ*/, /*Float:DrawDistance*/);
Create3DTextLabel(string, 0x008080FF, Pos[0], Pos[1], Pos[2], 40.0, 0, 0);
return 1;
}
Re: [AJUDA] Coloca nome em objetos -
focaximubh - 02.12.2014
Quote:
Originally Posted by iCasTiel
https://sampwiki.blast.hk/wiki/Create3DTextLabel
Onde as coordenadas x, y, z serгo as mesmas do objeto.
Basicamente:
pawn Код:
if ( !strcmp(cmdtext, "/grade") ) { new Float:Pos[3]; new meuNome[24]; new string[42];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]); GetPlayerName(playerid, meuNome, 24);
format(string, sizeof string, "Grade criada por %s", meuNome);
CreateObject(/*modelid*/, Pos[0], Pos[1], Pos[2], /*Float:rX*/, /*Float:rY*/, /*Float:rZ*/, /*Float:DrawDistance*/); Create3DTextLabel(string, 0x008080FF, Pos[0], Pos[1], Pos[2], 40.0, 0, 0); return 1; }
|
Lembre-se que se ele criar outra grade vai bugar o 3dtext......
Re: [AJUDA] Coloca nome em objetos -
Gii - 02.12.2014
Quote:
Originally Posted by focaximubh
Lembre-se que se ele criar outra grade vai bugar o 3dtext......
|
Nгo vai bugar ...
Do modo que foi feito o jogador poderб criar quantos portхes quiser (consequentemente os textos 3D tambйm).
O ideal seria armazenar tanto o ID do objeto quanto o ID do texto 3D para futuramente os mesmos poderem ser deletados.