16.12.2013, 12:45
okay this is the full code:
it shows only the "pDrugs" and "pSeeds" because it's digits (%i)
but the skill doesn't show anything because it's (%s) because i don't want it as digits.
all this topic is talking about how to make TextDrawSetString to show strings as letters not digits.
or how to make it work for (%s) ??
it shows only the "pDrugs" and "pSeeds" because it's digits (%i)
but the skill doesn't show anything because it's (%s) because i don't want it as digits.
all this topic is talking about how to make TextDrawSetString to show strings as letters not digits.
or how to make it work for (%s) ??
pawn Код:
public OnGameModeInit()
{
InvList = TextDrawCreate(27.500000, 181.999984, " ");
TextDrawLetterSize(InvList, 0.396874, 1.191666);
TextDrawAlignment(InvList, 1);
TextDrawColor(InvList, -1);
TextDrawSetShadow(InvList, 0);
TextDrawSetOutline(InvList, 1);
TextDrawBackgroundColor(InvList, 51);
TextDrawFont(InvList, 1);
TextDrawSetProportional(InvList, 1);
return 1;
}
CMD:inv(playerid, params[])
{
TextDrawShowForPlayer(playerid, InvList);
return 1;
}
forward UpdateInventory(playerid);
public UpdateInventory(playerid)
{
new string[128];
new pskill[MAX_PLAYERS char];
if(PlayerInfo[playerid][pSkill] == 1)
{
pskill[playerid] = Rapist;
}
format(string, sizeof string, "Skill: %s~n~Drugs: %i~n~Seeds: %i", pskill, PlayerInfo[playerid][pDrugs], PlayerInfo[playerid][pSeeds]);
TextDrawSetString(InvList, string);
}