How to set string in dialog
#1

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;
}
Reply


Messages In This Thread
How to set string in dialog - by DerickClark - 26.01.2017, 02:25
Re: How to set string in dialog - by StrikerZ - 26.01.2017, 02:27
Re: How to set string in dialog - by DerickClark - 26.01.2017, 02:35
Re: How to set string in dialog - by StrikerZ - 26.01.2017, 02:37
Re: How to set string in dialog - by DerickClark - 26.01.2017, 02:39
Re: How to set string in dialog - by StrikerZ - 26.01.2017, 02:45
Re: How to set string in dialog - by DerickClark - 26.01.2017, 02:50
Re: How to set string in dialog - by StrikerZ - 26.01.2017, 02:54
Re: How to set string in dialog - by DerickClark - 26.01.2017, 02:57
Re: How to set string in dialog - by StrikerZ - 26.01.2017, 03:04

Forum Jump:


Users browsing this thread: 1 Guest(s)