26.01.2017, 02:45
Here you go.
PHP код:
CMD:setmessage(playerid,params[])
{
ShowPlayerDialog(playerid,97,DIALOG_STYLE_INPUT,"Set Message","Enter the new join message you want to set","Set","Cancel");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 97)
{
if(response)
{
new string[128];
format(string, sizeof(string), "You have set your Join Message to: %s", inputtext);
SendClientMessage(playerid, -1, string);
format(PlayerInfo[playerid][personalmsg], 128, "%s", inputtext);
//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_query(mysql, query);
print(query);
}
}
return 1;
}