13.10.2013, 01:36
Hello,
I am messing around with scripting for sa-mp. I would like to be able to use something similar to format, only in my own custom function.
For example, if I have this code:
Is it possible to instead have a function like "format_mysql_query".
which would combine format and mysql_query. Or something similar for format_SendClientMessage?
Thanks a lot,
showdown
I am messing around with scripting for sa-mp. I would like to be able to use something similar to format, only in my own custom function.
For example, if I have this code:
Код:
new sPlayer[MAX_PLAYER_NAME]; GetPlayerName(playerid, sPlayer, MAX_PLAYER_NAME); new Query[128]; format(Query, 128, "INSERT INTO `"SQL_USERS_TABLE"` (`money`) VALUES ('%d') WHERE `username`=`%s`", 1000, sPlayer); mysql_query(Query);
Код:
new sPlayer[MAX_PLAYER_NAME]; GetPlayerName(playerid, sPlayer, MAX_PLAYER_NAME); format_mysql_query("INSERT INTO `"SQL_USERS_TABLE"` (`money`) VALUES ('%d') WHERE `username`=`%s`", 1000, sPlayer);
Thanks a lot,
showdown