Hallo,
Beim Magical Reallife Script gibt es ja diesen Befehl wo die Leader entscheiden können was die Member für einen Job kriegen der Befehl lautet /makedealer, jedoch wenn ich das mache und derjenige auch in meine Fraktion ist bekomme ich diese Meldung: "Dieser Spieler ist nicht in deiner Fraktion"
if(dialogid == 5553)
{
if(response)
{
new giveplayerid;
giveplayerid = ReturnUser(inputtext);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
new playerfaction, givefaction;
if(PlayerInfo[playerid][pLeader] == 0 && PlayerInfo[playerid][pMember] != 0) playerfaction = PlayerInfo[playerid][pMember];
if(PlayerInfo[playerid][pLeader] != 0) playerfaction = PlayerInfo[playerid][pLeader];
if(PlayerInfo[giveplayerid][pLeader] == 0 && PlayerInfo[playerid][pMember] != 0) givefaction = PlayerInfo[giveplayerid][pMember];
if(PlayerInfo[giveplayerid][pLeader] != 0) givefaction = PlayerInfo[giveplayerid][pLeader];
if(PlayerInfo[giveplayerid][pHitman] >= 1) givefaction = 8;
if(PlayerInfo[playerid][pHitman] >= 1) playerfaction = 8;
/*if(PlayerInfo[giveplayerid][pJob] >= 1)
{
SendClientMessage(playerid, COLOR_GRAD2, "Dieser Spieler hat bereits einen Job.");
return 1;
}*/
if(playerfaction == givefaction)
{
new giveplayer[MAX_PLAYER_NAME];
GetPlayerName(playerid,sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* %s bietet dir einen Job als Farmer an, du kannst mit '/accept job' den Job annehmen.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Du hast %s einen Job als Farmer angeboten.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
GettingJob[giveplayerid] = 17;
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "Dieser Spieler ist nicht in deiner Fraktion.");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "Dieser Spieler ist nicht Online.");
return 1;
}
}
}
else
{
format(string, sizeof(string), "Drogendealer \nWaffendealer \nHure \nAnwalt \nDetektiv \nFarmer");
ShowPlayerDialog(playerid, 163, DIALOG_STYLE_LIST, "Dealer",string,"Auswählen","Abbrechen");
return 1;
}
}
Der Befehl:
if(strcmp(cmd, "/makedealer", true) == 0) {
if(IsPlayerConnected(playerid)) {
if(PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pLeader] == 6
|| PlayerInfo[playerid][pHitman] == 2 || PlayerInfo[playerid][pLeader] == 12
|| PlayerInfo[playerid][pLeader] == 17 || PlayerInfo[playerid][pLeader] == 13
|| PlayerInfo[playerid][pMember] == 5 && PlayerInfo[playerid][pRank] >= 5
|| PlayerInfo[playerid][pMember] == 6 && PlayerInfo[playerid][pRank] >= 5
|| PlayerInfo[playerid][pHitman] == 1 && PlayerInfo[playerid][pRank] >= 5
|| PlayerInfo[playerid][pMember] == 12 && PlayerInfo[playerid][pRank] >= 5
|| PlayerInfo[playerid][pMember] == 13 && PlayerInfo[playerid][pRank] >= 5
|| PlayerInfo[playerid][pMember] == 17 && PlayerInfo[playerid][pRank] >= 5) {
format(string, sizeof(string), "Drogendealer \nWaffendealer \nHure \nDetektiv \nFarmer");
ShowPlayerDialog(playerid, 163, DIALOG_STYLE_LIST, "Dealer",string,"Auswählen","Abbreche");
return 1;
}
else {
SendClientMessage(playerid, COLOR_GRAD2, "Du bist kein Leader !");
return 1;
}
}
return 1;
}