3D Text Label formatting problem [+rep]
#6

Quote:
Originally Posted by Swarn
Посмотреть сообщение
Hello, i'm having a problem with detecting characters for my deathreasons, when a player dies it only displays "(( This player has been" but it should display the full text inside of the two brackets here is my code,

Код:
  format(maticalreason,sizeof(maticalreason),"(( This player has been injured, /damages %i for more information))", playerid);
  DeathReason[playerid] = Create3DTextLabel(maticalreason, COLOR_LIGHTRED, 30.0, 40.0, 50.0, 15.0, 0, 1);
  Attach3DTextLabelToPlayer(DeathReason[playerid], playerid, 0.0, 0.0, 0.5);
i have defined the Max Length of one line of text to 100.
#define MAXLEN 100

I'm really stumped on whats causing this problem.
First this can only display player id like this

This player has been injured, /damages "playerid in game his id" for more information

this is correct : maticalreason[128];

this is not needed : maticalreason[MAX_PLAYERS_NAME];

This code only edit that string and attach that create3dtext with that playerid who got damage.


Код:
new maticalreason[128];
  format(maticalreason,sizeof(maticalreason),"(( This player has been injured,\n/damages %i for more information))", playerid);
  DeathReason[playerid] = Create3DTextLabel(maticalreason, COLOR_LIGHTRED, 30.0, 40.0, 50.0, 15.0, 0, 1);
  Attach3DTextLabelToPlayer(DeathReason[playerid], playerid, 0.0, 0.0, 0.5);
I hope it help u.
Reply


Messages In This Thread
3D Text Label formatting problem [+rep] - by Swarn - 09.05.2016, 22:23
Re: 3D Text Label formatting problem [+rep] - by Dayrion - 09.05.2016, 23:13
Re: 3D Text Label formatting problem [+rep] - by Matical - 09.05.2016, 23:21
Re: 3D Text Label formatting problem [+rep] - by DTV - 10.05.2016, 02:16
Re: 3D Text Label formatting problem [+rep] - by Dayrion - 10.05.2016, 03:58
Re: 3D Text Label formatting problem [+rep] - by MBilal - 10.05.2016, 04:11
Re: 3D Text Label formatting problem [+rep] - by Matical - 10.05.2016, 04:19

Forum Jump:


Users browsing this thread: 1 Guest(s)