11.01.2018, 00:30
PHP код:
CMD:notice(playerid, params[])
{
if(isnull(params))
{
return SendClientMessage(playerid, COLOR_GREY, "/notice [text]")
}
if(pInfo[playerid][pNotice] == 1)
{
return SendClientMessage(playerid, COLOR_GREY, "You've used your notice. Type /deletenotice to delete it.")
}
else
{
pInfo[playerid][pNotice] = 1;
new string[127];
format(string, sizeof(string), "You've set your notice to %s", params)
SendClientMessage(playerid, COLOR_WHITE, string)
mysql_format(db_info, query, sizeof(query), "UPDATE players SET noticetext = %s WHERE pid = %i", params, GetPlayerDBId(playerid));
mysql_tquery(db_info, query, "", "");
}
return 1;
}
PHP код:
Description: Unknown column 'Test' in 'field list' (index 0). Query: // TEST is the params the player putted at /notice
[22:58:47] UPDATE players SET noticetext = Test WHERE pid = 1