Nabend,
komme hier nicht ganz weiter versuche gerade meine /scheinezeigen und meine /scheine in einen Dialog zu verfassen. Zurzeit sind es SendClientMessage. Doch ich verzweifel dran das umzuschreiben.
Einer vllt einen schupps in die richtige richtung ?
Hier der /scheine
if(strcmp(cmd,"/Scheine",true)==0)
{
if(IsPlayerConnected(playerid))
{
new text1[20];
new text3[20];
new text4[20];
new text5[20];
new text6[20];
new text7[20];
new text8[20];
new text9[20];
if(PlayerInfo[playerid][pCarLic]) { text1 = "bestanden"; } else { text1 = "nicht bestanden"; }
if(PlayerInfo[playerid][pFlyLic]) { text3 = "bestanden"; } else { text3 = "nicht bestanden"; }
if(PlayerInfo[playerid][pBoatLic]) { text4 = "bestanden"; } else { text4 = "nicht bestanden"; }
if(PlayerInfo[playerid][pFishLic]) { text5 = "bestanden"; } else { text5 = "nicht bestanden"; }
if(PlayerInfo[playerid][pGunLic]) { text6 = "bestanden"; } else { text6 = "nicht bestanden"; }
if(PlayerInfo[playerid][pMotoLic]) { text7 = "bestanden"; } else { text7 = "nicht bestanden"; }
if(PlayerInfo[playerid][pLKWLic]) { text8 = "bestanden"; } else { text8 = "nicht bestanden"; }
if(PlayerInfo[playerid][pRollerLic]) { text9 = "bestanden"; } else { text9 = "nicht bestanden"; }
SendClientMessage(playerid, COLOR_WHITE, "|__________________ Lizenzen __________________|");
format(string, sizeof(string), "** Führerschein: %s.", text1);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "** Fluglizenz: %s.", text3);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "** Segelschein: %s.", text4);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "** Angelschein: %s.", text5);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "** Waffenschein: %s.", text6);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "** Motorradschein: %s.", text7);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "** LKW Schein: %s.", text8);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "** Rollerschein: %s.", text9);
SendClientMessage(playerid, COLOR_GREY, string);
SendClientMessage(playerid, COLOR_WHITE, "|______________________________________________|");
}
return 1;
}
Und hier der /scheinezeigen
if(strcmp(cmd,"/Scheinezeigen",true)==0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "BENUTZUNG: /scheinezeigen [playerid/Name]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if (ProxDetectorS(8.0, playerid, giveplayerid))
{
if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Du kannst dir deine Lizenzen nicht selber zeigen, gib /scheine ein für Hilfe!"); return 1; }
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new text1[20];
new text3[20];
new text4[20];
new text5[20];
new text6[20];
new text9[20];
new text10[20];
new text12[20];
if(PlayerInfo[playerid][pCarLic]) { text1 = "bestanden"; } else { text1 = "nicht bestanden"; }
if(PlayerInfo[playerid][pFlyLic]) { text3 = "bestanden"; } else { text3 = "nicht bestanden"; }
if(PlayerInfo[playerid][pBoatLic]) { text4 = "bestanden"; } else { text4 = "nicht bestanden"; }
if(PlayerInfo[playerid][pFishLic]) { text5 = "bestanden"; } else { text5 = "nicht bestanden"; }
if(PlayerInfo[playerid][pLKWLic]) { text9 = "bestanden"; } else { text9 = "nicht bestanden"; }
if(PlayerInfo[playerid][pMotoLic]) { text10 = "bestanden"; } else { text10 = "nicht bestanden"; }
if(PlayerInfo[playerid][pGunLic]) { text6 = "bestanden"; } else { text6 = "nicht bestanden"; }
if(PlayerInfo[playerid][pRollerLic]) { text12 = "bestanden"; } else { text12 = "nicht bestanden"; }
format(string, sizeof(string), "|__________ Lizenzen von %s __________|", sendername);
SendClientMessage(giveplayerid, COLOR_WHITE, string);
format(string, sizeof(string), "** Führerschein: %s.", text1);
SendClientMessage(giveplayerid, COLOR_GREY, string);
format(string, sizeof(string), "** Fluglizenz: %s.", text3);
SendClientMessage(giveplayerid, COLOR_GREY, string);
format(string, sizeof(string), "** Segelschein: %s.", text4);
SendClientMessage(giveplayerid, COLOR_GREY, string);
format(string, sizeof(string), "** Angelschein: %s.", text5);
SendClientMessage(giveplayerid, COLOR_GREY, string);
format(string, sizeof(string), "** Waffenschein: %s.", text6);
SendClientMessage(giveplayerid, COLOR_GREY, string);
format(string, sizeof(string), "** LKW Schein: %s.", text9);
SendClientMessage(giveplayerid, COLOR_GREY, string);
format(string, sizeof(string), "** Motorradschein: %s.", text10);
SendClientMessage(giveplayerid, COLOR_GREY, string);
format(string, sizeof(string), "** Rollerschein: %s.", text12);
SendClientMessage(giveplayerid, COLOR_GREY, string);
format(string, sizeof(string), "* %s hat dir seine Lizenzen gezeigt.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Du hast deine Lizenzen %s gezeigt.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Dieser Spieler ist nicht in deiner Nähe !");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Dieser Spieler ist Offline !");
return 1;
}
}
return 1;
}