28.12.2011, 08:16
Ok I fixed it.
This works now, so if anyone wants to use it I recommend it. Its better because you could do:
format(nameformat,sizeof(nameformat),"%s\nSeat Belts",plname2); //for example
So when you get in a car and type /sb, a thing comes underneath your name with that information, and there are many more uses like Strength: %d, if you have a gym workout script.
So it works finr, I recommend it, thx for everyone who helped.
This works now, so if anyone wants to use it I recommend it. Its better because you could do:
format(nameformat,sizeof(nameformat),"%s\nSeat Belts",plname2); //for example
So when you get in a car and type /sb, a thing comes underneath your name with that information, and there are many more uses like Strength: %d, if you have a gym workout script.
So it works finr, I recommend it, thx for everyone who helped.
pawn Код:
public OnPlayerSpawn(playerid)
{
SetPlayerColor(playerid,COLOR_WHITE);
new plname2[MAX_PLAYER_NAME];
new nameformat[30];
new Text3D:playertextid;
new Float:X, Float:Y, Float:Z;
GetPlayerName(playerid, plname2, sizeof(plname2));
GetPlayerPos(playerid,X,Y,Z);
format(nameformat,sizeof(nameformat),"%s",plname2);
playertextid = Create3DTextLabel(nameformat,COLOR_WHITE,X,Y,Z+1.1,15,0,0);
Attach3DTextLabelToPlayer(playertextid, playerid, 0.0, 0.0, 1.1);
}