26.01.2017, 02:25
How can i make this command a dialog box when you type inside of it that code will be set and save in database.
Код:
CMD:setmessage(playerid,params[]) { new Message[128], string[128], query[128]; if(sscanf(params,"s[128]", Message)) return SendClientMessage(playerid, -1, "Usage: /setmessage [custom_message]"); format(string, sizeof(string), "You have set your Join Message to: %s", Message); SendClientMessage(playerid, -1, string); format(PlayerInfo[playerid][personalmsg], 128, "%s", Message); //save player account mysql_format(mysql, query, sizeof(query), "UPDATE `accounts` SET `SCORE`= %i , `Admin` = '%i' , `personalmsg` = '%e' WHERE `ID` = '%d'", GetPlayerScore(playerid), PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][personalmsg], PlayerInfo[playerid][ID]); mysql_tquery(mysql, query, "", ""); print(query); return 1; }