3d text labels on each pickup
#6

No, this function doesn't exist. But you still can make an alternative function to do this work. Check this one I made read the comments and the example there:

pawn Код:
// top of your script we will use this to store the coords of a pickup
new Float:PuPos[MAX_PICKUPS][3];

// Creation: CreatePu simply creates a pickup just like CreatePickup(); but stores its position into our declared variable
// returns: the pickup id (-1 on failure).
stock CreatePu(modelid, type, Float:X, Float:Y, Float:Z, virtualworld)
{
    new puid;
    puid = CreatePickup(modelid, type, X, Y, Z, virtualworld);
    PuPos[puid][0] = X;
    PuPos[puid][1] = Y;
    PuPos[puid][2] = Z;
    return puid;
}

// Usage of CreatePu:

/* Just like CreatePickup there's no difference */

// Creation: GetPuPos returnsa pickup position which is what you need
GetPuPos(pickupid, &Float:X, &Float:Y, &Float:Z)
{
    X = PuPos[pickupid][0];
    Y = PuPos[pickupid][1];
    Z = PuPos[pickupid][2];
}

// Usage of GetPuPos: It can be used like this (From your post)

for(new i = 0; i < MAX_PICKUPS; i ++)
{
    new Float:x,Float:y,Float:z;
    new str[128];
    new Text3D:pid;
    GetPuPos(i, x, y, z);
    pid = Create3DTextLabel(" " ,0xFFFF00AA, x, y, z+2.5, 100.0, 0, 0);
    format(str, sizeof(str), "Pickupid %d", i);
    Update3DTextLabelText(pid, 0xFFFF00AA, str);
}
Done and understood everything? Now you should replace CTRL+H CreatePickup or AddStaticPickup (or what ever function you use to create a pkup) with CreatePu.

Note: If you use a streamer for example Incognito's one you gotta replace CreatePickup in the CreatePu stock with CreateDynamicPickup.
Reply


Messages In This Thread
3d text labels on each pickup + save / load system - by Opah - 14.07.2012, 15:45
Re: 3d text labels on each pickup - by clarencecuzz - 14.07.2012, 15:49
Re: 3d text labels on each pickup - by Opah - 14.07.2012, 15:54
Re: 3d text labels on each pickup - by [KHK]Khalid - 14.07.2012, 16:05
Re: 3d text labels on each pickup - by Opah - 14.07.2012, 19:13
Re: 3d text labels on each pickup - by [KHK]Khalid - 14.07.2012, 20:52
Re: 3d text labels on each pickup - by SuperViper - 14.07.2012, 20:55
Re: 3d text labels on each pickup - by Opah - 15.07.2012, 01:23

Forum Jump:


Users browsing this thread: 1 Guest(s)