How to set string in dialog
#6

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(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == 97)
    {
        if(
response)
        {
            new 
string[128];
            
format(stringsizeof(string), "You have set your Join Message to: %s"inputtext);
            
SendClientMessage(playerid, -1string);
            
format(PlayerInfo[playerid][personalmsg], 128"%s"inputtext);
            
//save player account
            
mysql_format(mysqlquerysizeof(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(mysqlquery);
            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)