3D Label to player
#3

pawn Код:
if (strcmp("/soldier", cmdtext, true, 10) == 0)
    {
    new Float:X, Float:Y, Float:Z;
    GetPlayerPos( playerid, X, Y, Z );
    new string[128], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    SendClientMessage(playerid, soldiercolor, "You are now a soldier.");
    pTeam[playerid] = team_soldier;
    SetPlayerSkin(playerid, 287);
    GivePlayerWeapon(playerid, 17, 10);
    GivePlayerWeapon(playerid, 27, 50);
    GivePlayerWeapon(playerid, 31, 200);
    format(string, sizeof(string), " %s : Soldier", name);
    new Text3D:playertextid = Create3DTextLabel(string, soldiercolor, 30.0, 40.0, 50.0, 40.0, 0, 0);
    Attach3DTextLabelToPlayer(playertextid[playerid], playerid, 0.0, 0.0, 0.7); // labels attaches it.
    return 1;
}
Edit: The problem was there isn't PlayerText3D and you can't use GetPlayerName without declarating it.
You must first create a 3DTextLabel then to try to attach it on the player
Reply


Messages In This Thread
3D Label to player - by Pawnstar - 26.11.2012, 21:14
Re: 3D Label to player - by Bicentric - 26.11.2012, 21:22
Re: 3D Label to player - by RenSoprano - 26.11.2012, 21:24
Re: 3D Label to player - by Bicentric - 26.11.2012, 21:26
Re: 3D Label to player - by Scenario - 26.11.2012, 21:27
Re: 3D Label to player - by RenSoprano - 26.11.2012, 21:28
Re: 3D Label to player - by Bicentric - 26.11.2012, 21:32
Re: 3D Label to player - by Pawnstar - 27.11.2012, 14:25

Forum Jump:


Users browsing this thread: 1 Guest(s)