Hallo Breadfish,
Ich habe mal eine Frage könnte jemadn /showlicenses in einem Dialog machen
da ich es viel Besser finde.
Hier mal was aus mein Script.
if(strcmp(cmd,"/showlicenses",true)==0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "BENUTZUNG: /showlicenses [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 licensen nicht selber zeigen, gib /licenses 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), "|__________ licensen 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), "** Fluglicens: %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 licensen gezeigt.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Du hast deine licensen %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;
}