SA-MP Forums Archive
strcat - 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: strcat (/showthread.php?tid=448860)



strcat - Zex Tan - 06.07.2013

Does it works if I did

pawn Код:
new string[20];
strcat(string, "Hats: %d", pInfo[playerid][Hats]);
SendClientMessage(playerid, string);
return 1;
So, will it show the amount of hats to the message ? I got no errors for this but I'm not sure if this works or not ?


Re: strcat - Income - 06.07.2013

Quote:
Originally Posted by Zex Tan
Посмотреть сообщение
Does it works if I did

pawn Код:
new string[20];
strcat(string, "Hats: %d", pInfo[playerid][Hats]);
SendClientMessage(playerid, string);
return 1;
So, will it show the amount of hats to the message ? I got no errors for this but I'm not sure if this works or not ?
Why don't you test that then?
If doesn't works, use the code below:

pawn Код:
new string[20];
format(string, sizeof(string),"Hats: %d", pInfo[playerid][Hats]);
SendClientMessage(playerid, string);
return 1;