Dynamic 3d text - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Dynamic 3d text (
/showthread.php?tid=417604)
Dynamic 3d text -
thefatshizms - 21.02.2013
Don't know what the hell I'm doing wrong..
pawn Код:
CMD:test(playerid, params[])
{
new bleh[128], Float:pos[3];
if(sscanf(params,"s[128]",bleh)) return SendClientMessage(playerid, COLOR_RED2,"Usage: /test <text>");
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
CreateDynamic3DTextLabel(bleh, COLOR_RED2, pos[0],pos[1],pos[2], 10.0, -1, -1, 0, -1, -1, -1, 100.0);
return 1;
}
label doesn't show.
Re: Dynamic 3d text -
Krakuski - 21.02.2013
What you were missing was the X Y Z for the command. It did not know where to put your 3Dtext, so it didnt make one.. Try this
pawn Код:
//You must have these includes
#include <a_samp>
#include <zcmd>
#include <sscanf2>
#include <streamer>
//In-between a command, or at the bottom of the script
CMD:test(playerid, params[])
{
if(unformat(params,"s[128]",params)) return SendClientMessage(playerid, COLOR_RED2,"Usage: /test <text>");
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X,Y,Z);
CreateDynamic3DTextLabel(params, COLOR_RED2, X, Y, Z, 40.0, 0, 0);
new Msg[128];
format(Msg,sizeof(Msg),"3D Text Created!(Description: %s)",params);
SendClientMessage(playerid, COLOR_RED2,Msg);
return 1;
}
Re: Dynamic 3d text -
[CG]Milito - 21.02.2013
Quote:
Originally Posted by Krakuski
What you were missing was the X Y Z for the command. It did not know where to put your 3Dtext, so it didnt make one.. Try this
pawn Код:
//You must have these includes #include <a_samp> #include <zcmd> #include <sscanf2> #include <streamer>
//In-between a command, or at the bottom of the script CMD:test(playerid, params[]) { if(unformat(params,"s[128]",params)) return SendClientMessage(playerid, COLOR_RED2,"Usage: /test <text>"); new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid, X,Y,Z); CreateDynamic3DTextLabel(params, COLOR_RED2, X, Y, Z, 40.0, 0, 0); new Msg[128]; format(Msg,sizeof(Msg),"3D Text Created!(Description: %s)",params); SendClientMessage(playerid, COLOR_RED2,Msg); return 1; }
|
Actually, Thats what
is doing, getting the possition.
pawn Код:
Float:pos[3];
GetPlayerPos(playerid,Float:pos[1],Float:pos[2],Float:pos[3]);
Got it?
On-Topic: I don't know whats wrong with it, as you are not missing any parameter., maybe your Streamer is outdated.
Re: Dynamic 3d text -
thefatshizms - 22.02.2013
Bamp. the streamer isn't out of date.