How to put a mysql integrer in a message?
#2

When using specifiers (%s, %d, %i, ...) in a string, you must format it:
PHP код:
new formatString[45];
format(formatStringsizeof(formatString), "The owner of this vehicle is %s""A person's name");
SendClientMessage(playerid, -1formatString); 
%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].
Reply


Messages In This Thread
How to put a mysql integrer in a message? - by MineiriinHo - 01.11.2016, 00:01
Re: How to put a mysql integrer in a message? - by AndySedeyn - 01.11.2016, 00:53

Forum Jump:


Users browsing this thread: 1 Guest(s)