Put on the same line.
#1

Hello, I've been banging my head on this for a long time, what am I trying to do? I would like to put the gates of the player in a single line, the way it is shown in two lines, for example, the player has a cigarette lighter, how do you jump to put the two items on the same line? It's easy to understand, the code below that I did in two lines says it all.

PHP код:
        if(PlayerData[playerid][pCigarros])
        {
            new 
cigarro[]= "Cigarros:[%d]"PlayerData[playerid][pCigarros];
            
format(strglobalsizeof(strglobal), "%s"cigarro);
        }
        if(
PlayerData[playerid][pIsqueiro])
        {
            new 
isqueiro[]= "Isqueiro:[%d]"PlayerData[playerid][pIsqueiro];
            
format(strglobalsizeof(strglobal), "%s"isqueiro);
        }
        
SendClientMessage(playerid, -1strglobal); 
Reply
#2

if that is not right, try to explain what you mean (english that someone can understand, please)

PHP код:
new cigarrosAndIsquerio[50];
if(
PlayerData[playerid][pCigarros] && PlayerData[playerid][pIsqueiro]) 
{
    
format(cigarrosAndIsqueriosizeof(cigarrosAndIsquerio), "Cigarros:[%d]\nIsqueiro:[%d]"PlayerData[playerid][pCigarros], PlayerData[playerid][pIsqueiro]);
    
SendClientMessage(playerid, -1cigarrosAndIsquerio);

Reply
#3

"strglobal" sounds like a bad code.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)