04.02.2015, 12:55
pawn Code:
if(dialogid == DIALOG_ETPW)
{
new string[128];
if(response == 1)
{
new password[50];
format(password, sizeof(password), "%s, inputtext); //change this aswell
if(!strlen(inputtext))
{
ShowPlayerDialog(playerid,DIALOG_ETPW,DIALOG_STYLE_INPUT,"{FFFFFF}ET Gate Password","{FFFFFF}Please enter a new password.","Ok","Cancel");
return 1;
}
format(string,sizeof(string),""COL_ADMIN"[ADMIN] {FFFFFF}You have changed {AFAFAF}[ET]{FFFFFF} gate password to %s!",password);
SCM(playerid,COLOR_WHITE,string);
format(string,sizeof(string),"%s(%d) has changed [ET] gate password.",PlayerName(playerid),playerid);
SendALogMessage(string);
//passwordET = password; // HERE IS THE PROBLEM, I want to set a string to string.
format(passwordET, sizeof(passwordET) , "%s", password); //use this to set one string as another.
return 1;
}
}
Use "format" to format other text-strings. Read more here:
https://sampwiki.blast.hk/wiki/Format