new str[128], final[512]; format(str, sizeof(str), "~y~mission passed!~n~"); strcat(final, str); if(reward_exp > 0) { format(str, sizeof(str), "~w~+%i exp ", reward_exp); strcat(final, str); } if(reward_criminal > 0) { format(str, sizeof(str), "~w~+%i criminal ", reward_criminal); strcat(final, str); } if(reward_cop > 0) { format(str, sizeof(str), "~w~+%i cop ", reward_cop); strcat(final, str); } if(reward_money > 0) { format(str, sizeof(str), "~w~+%i$ ", reward_money); strcat(final, str); } GameTextForPlayer(playerid,final, 3000, 3);
new str[128], final[512]; format(str, sizeof(str), "~y~mission passed!~n~"); strcat(final, str); if(reward_exp > 0) { format(str, sizeof(str), "~w~+%i exp~n~", reward_exp); strcat(final, str); } if(reward_criminal > 0) { format(str, sizeof(str), "~w~+%i criminal~n~", reward_criminal); strcat(final, str); } if(reward_cop > 0) { format(str, sizeof(str), "~w~+%i cop~n~", reward_cop); strcat(final, str); } if(reward_money > 0) { format(str, sizeof(str), "~w~+%i$~n~", reward_money); strcat(final, str); } GameTextForPlayer(playerid,final, 3000, 3);
~w~+%i exp, ~w~+%i criminal
I did ~n~in the end of the first one, and a space in the end of every second one, cause i want
Code:
~w~+%i exp, ~w~+%i criminal |
new str[128], final[512];
format(str, sizeof(str), "~y~mission passed!~n~");
strcat(final, str);
if(reward_exp > 0) {
format(str, sizeof(str), "~w~+%i exp,", reward_exp);
strcat(final, str);
}
if(reward_criminal > 0) {
format(str, sizeof(str), "~w~+%i criminal~n~", reward_criminal);
strcat(final, str);
}
if(reward_cop > 0) {
format(str, sizeof(str), "~w~+%i cop~n~", reward_cop);
strcat(final, str);
}
if(reward_money > 0) {
format(str, sizeof(str), "~w~+%i$~n~", reward_money);
strcat(final, str);
}
GameTextForPlayer(playerid,final, 3000, 3);
/* if(reward_cop > 0) {
format(str, sizeof(str), "~w~+%i cop~n~", reward_cop);
strcat(final, str);
}
if(reward_money > 0) {
format(str, sizeof(str), "~w~+%i$~n~", reward_money);
strcat(final, str);
}*/
u mean like this?
PHP Code:
PHP Code:
|
The code u post is exactly like mine but u put a ~n~ creating 5 lines instead of 2
i want this: Mission Passed! +30 exp +20 criminal +5 cop +300000$ just like i tried to do the problem is this second line: +30 exp +20 criminal +5 cop +300000$ is not showing and idk why |
if(reward_exp > 0 && reward_criminal > 0 && reward_cop > 0 && reward_money > 0)
{
format(str2, sizeof(str2), "~y~mission passed!~n~ ~w~+%i exp, ~w~+%i criminal, ~w~+%i cop, ~w~+%i$", reward_exp , reward_criminal, reward_cop, reward_money);
strcat(final, str);
GameTextForPlayer(playerid,final, 3000, 3);
}