Attach3DTextLabelToPlayer Help
#1

Okay, let me explain this, i would like to do something on this, i would like to put an 3D Text Label on an player that isn't wearing an helmet on the bike, is this possible? If he as the helmet on, there isn't any 3D Text Label on him, but if he isn't with the helmet the 3D Text Label appears on him, saying something like: This retarded isn't wearing an helmet.

pawn Код:
if(strcmp(cmd,"/helmet",true)==0)
  {
  if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
  {
    SendClientMessage(playerid,COLOR_GREY,"You are not in a bike");
    return 1;
    }
  if(PlayerInfo[playerid][rHelmet] == 1)
  {
    PlayerInfo[playerid][rHelmet] = 0;
  GetPlayerName(playerid, sendername, sizeof(sendername));
  new stringtosee[255];
  new ftext[255];
  if(PlayerInfo[playerid][pSex] == 1) { ftext = "o"; }
  else if(PlayerInfo[playerid][pSex] == 1) { ftext = "o"; }
  format(stringtosee, sizeof(stringtosee), "* %s takes %s his helmet.", sendername , ftext);
  ProxDetector(30.0, playerid, stringtosee, 0xC2A2DAAA,0xC2A2DAAA,0xC2A2DAAA,0xC2A2DAAA,0xC2A2DAAA);
    return 1;
    }
    PlayerInfo[playerid][rHelmet] = 1;
  GetPlayerName(playerid, sendername, sizeof(sendername));
  new stringtosee[255];
  new ftext[255];
  if(PlayerInfo[playerid][pSex] == 1) { ftext = "o"; }
  else if(PlayerInfo[playerid][pSex] == 1) { ftext = "o"; }
  format(stringtosee, sizeof(stringtosee), "* %s wears %s his helmet.", sendername , ftext);
  ProxDetector(30.0, playerid, stringtosee, 0xC2A2DAAA,0xC2A2DAAA,0xC2A2DAAA,0xC2A2DAAA,0xC2A2DAAA);
  return 1;
  }
Reply
#2

https://sampwiki.blast.hk/wiki/Attach3DTextLabelToPlayer
And I suggest you to check carefully if the player is on a bike than checking his state.
Reply
#3

Quote:
Originally Posted by MenaceX^
https://sampwiki.blast.hk/wiki/Attach3DTextLabelToPlayer
And I suggest you to check carefully if the player is on a bike than checking his state.
Okay, thanks

Btw, what is the better to that, SetPlayerChatBubble or Attach3DTextLabelToPlayer?
Reply
#4

Quote:
Originally Posted by RoamPT
Quote:
Originally Posted by MenaceX^
https://sampwiki.blast.hk/wiki/Attach3DTextLabelToPlayer
And I suggest you to check carefully if the player is on a bike than checking his state.
Okay, thanks

Btw, what is the better to that, SetPlayerChatBubble or Attach3DTextLabelToPlayer?
SetPlayerChatBubble goes away after certain milliseconds you set, so in this situation Attach3DTextLabelToPlayer is the best.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)