10.05.2016, 04:11
Quote:
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); #define MAXLEN 100 I'm really stumped on whats causing this problem. |
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);