3d/2d text above icons? or anywhere
#1

Well im trying to script just a name in front of a garage to tell people who the owner is, and im having alot of trouble
i'm asking if anyone can help?
Reply
#2

What kind of name?? A text String that shows it if your within a cretin distance??
Reply
#3

Quote:
Originally Posted by seifo
Посмотреть сообщение
Well im trying to script just a name in front of a garage to tell people who the owner is, and im having alot of trouble
i'm asking if anyone can help?
He clearly said what he wants to use it for.

pawn Код:
Create3DTextLabel("your string here",0x008080FF,garage[x],garage[y],garage[z],40.0,0);
Use a string in there to display the owner of the certain garage and for the coordinates, use the array you use for the garage system.
Reply
#4

thanks alot bro ill check it out
Reply
#5

getting 2 errors

Quote:

public OnPlayerText(playerid, text[])
{
if (AccountInfo[playerid][Mute] == 1)
{
SendClientMessage(playerid, RED, "You are muted! You cannot talk.");
return 0;
}
return 1;
}
Create3DTextLabel("seifo",0x008080FF,garage[1586.25],garage[1189.62],garage[23.43],40.0,0);

}

error 054: unmatched closing brace ("}")
error 010: invalid function or declaration

any ideas?
Reply
#6

Look This:

Код:
public OnPlayerText(playerid, text[])
{
if (AccountInfo[playerid][Mute] == 1)
{
SendClientMessage(playerid, RED, "You are muted! You cannot talk.");
return 0;
}
Create3DTextLabel("seifo",0x008080FF,garage[1586.25],garage[1189.62],garage[23.43],40.0,0);
return 1;
}
Reply
#7

You have 1 extra closing brace in OnPlayerText. The garage[x] etc. were just examples. I'm guessing you're using an array for the garage system, like GarageInfo[garageid][PosX],GarageInfo[garageid][Owner] etc. When loading the garages, that's where you should use the Create3DTextLabel.

Here's an example, I hope you'll understand what I mean by it:

pawn Код:
stock LoadGarages()
{
    /*

        This part loads the imaginable garages

    */


    // Now that we have our garages loaded, lets place the 3DTextLabel at them, to show the owner
    new string[24];
    for(new i = 0; i < sizeof(GarageInfo); i++)
    {
        format(string,sizeof(string),"%s",GarageInfo[i][Owner]);
        Create3DTextLabel(string,0x008080FF,GarageInfo[i][PosX],GarageInfo[i][PosY],GarageInfo[i][PosZ],40.0,0);
    }
}
Here's the fix for OnPlayerChat:

pawn Код:
public OnPlayerText(playerid, text[])
{
    if(AccountInfo[playerid][Mute] == 1)
        return SendClientMessage(playerid, RED, "You are muted! You cannot talk.");
    return 1;
}

Would be great if you could show me the way you load the garages.
Reply
#8

they are custom ones that i built in mta and converted to creatobject

btw i want it like this if u see what i mean
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)