Dynamic 3d text
#1

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.
Reply
#2

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;
}
Reply
#3

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
pawn Код:
Float:pos[3]
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.
Reply
#4

Bamp. the streamer isn't out of date.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)