#include a_samp
#include zcmd
new Text3D:szovege[MAX_PLAYERS];
new letrehozva[MAX_PLAYERS];
CMD:mytext(playerid, params[])
{
if(letrehozva[playerid] != 1)
{
new irni[64],Float:x,Float:y,Float:z;
format(irni,sizeof(irni),\" %s \",params);
GetPlayerPos(playerid,x,y,z);
szovege[playerid] = Create3DTextLabel(irni,0xFFFFFFFF,x,y,z,40, GetPlayerVirtualWorld(playerid), 0);
Attach3DTextLabelToPlayer(szovege[playerid], playerid, 0.0, 0.0, 0.7);
letrehozva[playerid] = 1;
SendClientMessage(playerid,-1,\"Létrehozva!\");
} else {
new updated[64];
format(updated,sizeof(updated),\" %s \",params);
Update3DTextLabelText(szovege[playerid], 0xFFFFFFFF, updated);
SendClientMessage(playerid,-1,\"Sikeresen frissítve!\");
}
return 1;
}
CMD:removetext(playerid, params[])
{
Delete3DTextLabel(szovege[playerid]);
SendClientMessage(playerid,-1,\"Sikeresen törölve!\");
letrehozva[playerid] = 0;
return 1;
}