01.11.2016, 00:53
When using specifiers (%s, %d, %i, ...) in a string, you must format it:
%s in this example is replaced by "A person's name" and then put into the format variable called formatString (minus the quotation marks, of course).
You will have to do exactly that but instead of having a static string, you must reuse the variable that holds the owner's name. You'll have to send an extra query to retrieve the name from the row of which the database ID is equal to CarData[id][carOwner].
PHP код:
new formatString[45];
format(formatString, sizeof(formatString), "The owner of this vehicle is %s", "A person's name");
SendClientMessage(playerid, -1, formatString);
You will have to do exactly that but instead of having a static string, you must reuse the variable that holds the owner's name. You'll have to send an extra query to retrieve the name from the row of which the database ID is equal to CarData[id][carOwner].