Put on the same line. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Put on the same line. (
/showthread.php?tid=625209)
Put on the same line. -
SukMathcuck - 29.12.2016
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(strglobal, sizeof(strglobal), "%s", cigarro);
}
if(PlayerData[playerid][pIsqueiro])
{
new isqueiro[]= "Isqueiro:[%d]", PlayerData[playerid][pIsqueiro];
format(strglobal, sizeof(strglobal), "%s", isqueiro);
}
SendClientMessage(playerid, -1, strglobal);
Re: Put on the same line. -
BiosMarcel - 29.12.2016
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(cigarrosAndIsquerio, sizeof(cigarrosAndIsquerio), "Cigarros:[%d]\nIsqueiro:[%d]", PlayerData[playerid][pCigarros], PlayerData[playerid][pIsqueiro]);
SendClientMessage(playerid, -1, cigarrosAndIsquerio);
}
Re: Put on the same line. -
OneDay - 30.12.2016
"strglobal" sounds like a bad code.