SA-MP Forums Archive
Attach3DTextLabelToPlayer Help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Attach3DTextLabelToPlayer Help (/showthread.php?tid=101743)



Attach3DTextLabelToPlayer Help - RoamPT - 11.10.2009

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;
  }



Re: Attach3DTextLabelToPlayer Help - MenaceX^ - 11.10.2009

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


Re: Attach3DTextLabelToPlayer Help - RoamPT - 11.10.2009

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?


Re: Attach3DTextLabelToPlayer Help - Chaprnks - 11.10.2009

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.