new string1[64];
if(dialogid == DIALOG_SMSPlayer)
{
if(!response) return ShowPlayerDialog(playerid, DIALOG_HANDYMENU, DIALOG_STYLE_LIST, "HTC ONE X","Service\nSMS schreiben","Weiter","Abbrechen");
{
new pID = strval(inputtext);
if(!strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_SMSPlayer,DIALOG_STYLE_INPUT,"SMS","An wem möchtest du eine SMS verfassen?","Weiter","Zurück");
if(!IsPlayerConnected(pID))return ShowPlayerDialog(playerid,DIALOG_SMSPlayer,DIALOG_STYLE_INPUT,"SMS","Der angegebene Spieler ist nicht online!","Weiter","Zurück");
ShowPlayerDialog(playerid,DIALOG_SMSText,DIALOG_STYLE_INPUT,"SMS","Bitte gebe deine SMS nun ein!","Absenden","Zurück");
format(string1, sizeof string1, "%s",SpielerName(pID));
SetPVarString(playerid,"SMSAn",string1);
return 1;
}
}
if(dialogid == DIALOG_SMSText)
{
if(!response) return ShowPlayerDialog(playerid,DIALOG_SMSPlayer,DIALOG_STYLE_INPUT,"SMS","An wem möchtest du eine SMS verfassen?","Weiter","Zurück");
{
new string = strval(inputtext), text[512],name[24];
if(!strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_SMSText,DIALOG_STYLE_INPUT,"SMS","Bitte gebe deine SMS nun ein!","Absenden","Zurück");
for(new i=0;i<GetMaxPlayers();i++)
{
GetPlayerName(i,name,sizeof name);
if(strcmp(GetPVarString(playerid,"SMSAn"),name, true)==0) { SetPVarInt(playerid,"pID",i); break; }
else { }
}
format(text,sizeof(text),"{FF0019}SMS: {FFFFFF}%s {FF0019}Absender: {FFFFFF}%s",string,SpielerName(playerid));
SendClientMessage(GetPVarInt(playerid,"pID"),ROT,text); //Diese Zeile :)
format(text,sizeof(text),"{FF0019}SMS: {FFFFFF}%s {FF0019}an Empfänger: {FFFFFF}%s {FF0019}gesendet!",string,string1);
SendClientMessage(playerid,ROT,text);
GivePlayerMoney(playerid, -2);
return 1;
}
}
Ungetestet sollte aber so gehn - habe auch nur hier geschrieben kann also schreibfehler enthalten