Sziasztok!
A Defensive RPG modot editelem és szeretném azt megcsinálni hogy csak az FT legyen zöld színû, a többi maradjon fehér.
Bemásolom a kódot:
forward CheckMoney(playerid);
public CheckMoney(playerid)
{
new string[128];
if(pInfo[playerid][pMoney] < 10)
{
format(string, sizeof(string), \"0000000%i{4da341}Ft\", pInfo[playerid][pMoney]);
TextDrawSetString(Ft[playerid], string);
TextDrawShowForPlayer(playerid, Ft[playerid]);
TextDrawShowForPlayer(playerid, Box[playerid]);
}
if(10 <= pInfo[playerid][pMoney] < 100)
{
format(string, sizeof(string), \"000000%i{4da341}Ft\", pInfo[playerid][pMoney]);
TextDrawSetString(Ft[playerid], string);
TextDrawShowForPlayer(playerid, Ft[playerid]);
TextDrawShowForPlayer(playerid, Box[playerid]);
}
if(100 <= pInfo[playerid][pMoney] < 1000)
{
format(string, sizeof(string), \"00000%i{4da341}Ft\", pInfo[playerid][pMoney]);
TextDrawSetString(Ft[playerid], string);
TextDrawShowForPlayer(playerid, Ft[playerid]);
TextDrawShowForPlayer(playerid, Box[playerid]);
}
if(1000 <= pInfo[playerid][pMoney] < 10000)
{
format(string, sizeof(string), \"0000%i{4da341}Ft\", pInfo[playerid][pMoney]);
TextDrawSetString(Ft[playerid], string);
TextDrawShowForPlayer(playerid, Ft[playerid]);
TextDrawShowForPlayer(playerid, Box[playerid]);
}
if(10000 <= pInfo[playerid][pMoney] < 100000)
{
format(string, sizeof(string), \"000%i{4da341}Ft\", pInfo[playerid][pMoney]);
TextDrawSetString(Ft[playerid], string);
TextDrawShowForPlayer(playerid, Ft[playerid]);
TextDrawShowForPlayer(playerid, Box[playerid]);
}
if(100000 <= pInfo[playerid][pMoney] < 1000000)
{
format(string, sizeof(string), \"00%i{4da341}Ft\", pInfo[playerid][pMoney]);
TextDrawSetString(Ft[playerid], string);
TextDrawShowForPlayer(playerid, Ft[playerid]);
TextDrawShowForPlayer(playerid, Box[playerid]);
}
if(1000000 <= pInfo[playerid][pMoney] < 10000000)
{
format(string, sizeof(string), \"0%i{4da341}Ft\", pInfo[playerid][pMoney]);
TextDrawSetString(Ft[playerid], string);
TextDrawShowForPlayer(playerid, Ft[playerid]);
TextDrawShowForPlayer(playerid, Box[playerid]);
}
if(10000000 <= pInfo[playerid][pMoney] < 999999999)
{
format(string, sizeof(string), \"%i{4da341}Ft\", pInfo[playerid][pMoney]);
TextDrawSetString(Ft[playerid], string);
TextDrawShowForPlayer(playerid, Ft[playerid]);
TextDrawShowForPlayer(playerid, Box[playerid]);
}
return 1;
}
És itt csak az Ft kellene hogy zöld legyen, ahogy látjátok próbáltam már megoldani de úgy nem sikerül. Köszi elõre is!