Hallo,
Ich will nen /duty Befehl für die Cops machen, dass man eben wenn ich als Cop in den Dienst gehe, die anderen Cops als Markierung auf der Mini-Map unten links sehe und die anderen mich. Nur will das nicht so wirklich funktionieren, also es erscheint keine Markierung.
Hier mein Code, mit dem ich es probiert habe:
if(strcmp(cmd, "/duty", true) == 0)
{
if(OnDuty[playerid]==0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
{
if (PlayerToPoint(6, playerid,253.9974,78.0809,1003.6406) || PlayerToPoint(3,playerid,199.4482,168.2397,1003.0234) || PlayerToPoint(3,playerid,199.4482,168.2397,1003.0234)|| PlayerInfo[playerid][pLocal] != 255)
{
PreviousSkin[playerid] = GetPlayerSkin(playerid);
format(string, sizeof(string), "* %s begibt sich nun als Polizist in den Dienst.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
if(PlayerInfo[playerid][pSex] == 1)
{
if(PlayerInfo[playerid][pRank] == 1) { SetPlayerSkin(playerid, 71); }
else if(PlayerInfo[playerid][pRank] == 2) { SetPlayerSkin(playerid, 280); }
else if(PlayerInfo[playerid][pRank] == 3) { SetPlayerSkin(playerid, 265); }
else if(PlayerInfo[playerid][pRank] == 4) { SetPlayerSkin(playerid, 267); }
else if(PlayerInfo[playerid][pRank] == 5) { SetPlayerSkin(playerid, 282); }
else if(PlayerInfo[playerid][pRank] == 6) { SetPlayerSkin(playerid, 283); }
}
else if(PlayerInfo[playerid][pSex] == 2)
{
SetPlayerSkin(playerid, 192);
}
GivePlayerWeapon(playerid, 3, 1);
GivePlayerWeapon(playerid, 22, 500);
GivePlayerWeapon(playerid, 29, 700);
GivePlayerWeapon(playerid, 25, 250);
GivePlayerWeapon(playerid, 41, 1500);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SetPlayerColor(playerid, COLOR_LIGHTBLUE);
OnDuty[playerid] = 1;
for(new i = 0; i<MAX_PLAYERS; i++) // Hier soll der Player Marker
{
if(PlayerInfo[playerid][pMember] == 1||2||21 || PlayerInfo[playerid][pTeam] == 1||2||21)
{
SetPlayerMarkerForPlayer(playerid, i, COLOR_LIGHTBLUE);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Du bist kein Beamter!");
}
}
}
else if(OnDuty[playerid] == 1)
{
if (PlayerToPoint(6, playerid,253.9974,78.0809,1003.6406) || PlayerToPoint(3,playerid,199.4482,168.2397,1003.0234) || PlayerToPoint(3,playerid,199.4482,168.2397,1003.0234)|| PlayerInfo[playerid][pLocal] != 255)
{
GetPlayerName(playerid, sendername, sizeof(plname));
format(string, sizeof(string), "* Beamter %s legt Uniform in seinen Spint.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetPlayerSkin(playerid, PreviousSkin[playerid]);
ResetPlayerWeapons(playerid);
SetPlayerToTeamColor(playerid);
SetPlayerArmour(playerid, 0);
OnDuty[playerid] = 0;
for(new i = 0; i<MAX_PLAYERS; i++)
{
if(PlayerInfo[playerid][pMember] == 1||2||21 || PlayerInfo[playerid][pTeam] == 1||2||21) // Hier soll der Player Marker von den anderen Cops wieder verschwinden.
{
SetPlayerMarkerForPlayer(playerid, i, 0xFFFFFF00);
}
}
}
}
return 1;
}
Aber es erscheint nichts. Es handelt sich um das LoH Script.
Pls Help
V1rus