View Single Post
Old 02/01/2020, 02:16 PM   #5
Flofey
Little Clucker
 
Flofey's Avatar
 
Join Date: Oct 2018
Location: South the moon
Posts: 36
Reputation: 11
Default Re: newline GameTextForPlayer not work

Quote:
Originally Posted by binnyl View Post
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
in the same line
u mean like this?

PHP Code:
    new str[128], final[512];
    
format(strsizeof(str), "~y~mission passed!~n~");
    
strcat(final, str);
    if(
reward_exp 0) {
        
format(strsizeof(str), "~w~+%i exp,"reward_exp);
        
strcat(final, str);
    }
    if(
reward_criminal 0) {
        
format(strsizeof(str), "~w~+%i criminal~n~"reward_criminal);
        
strcat(final, str);
    }
    if(
reward_cop 0) {
        
format(strsizeof(str), "~w~+%i cop~n~"reward_cop);
        
strcat(final, str);
    }
    if(
reward_money 0) {
        
format(strsizeof(str), "~w~+%i$~n~"reward_money);
        
strcat(final, str);
    }
    
GameTextForPlayer(playerid,final, 30003); 

btw here these 2 lines are going to pop up under the first 2 lines. (because of ~n~)
PHP Code:
/*   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);
    }*/ 
__________________
Discord: Flofey#8478
Flofey is offline   Reply With Quote