Hey leute ich hoffe ihr habt eine id das problem ist wenn ich aduty gehen kann mann mich auf der karte icht sehen ich weiß nicht wo der fehler liegt ich hoffe ihr könnt mir helfen MfG luiluiboy014
Code
COMMAND:aduty(playerid,params[])
{
if(ImTutorial[playerid] != 0)return SendClientMessage(playerid,GRAU,"Du kannst keine Befehle nutzen,da du im Tutorial bist.");
if(GetPVarInt(playerid,"Eingeloggt") == 0)return SendClientMessage(playerid,GRAU,"Du bist nicht eingeloggt!");
if(Spieler[playerid][pAWAYFROMKEYBOARD] == 1)return SendClientMessage(playerid,WRONGCMD,"Du bist im AFK-Modus und kannst somit keine Befehle nutzen."),SendClientMessage(playerid,WRONGCMD,"BENUTZE: /back");
new string[128];
if(!isPlayerAnAdmin(playerid,1))return SendClientMessage(playerid,GRAU,"Du bist kein "#SERVERTAG" Teammitglied./Du hast nicht den jeweiligen Adminrang.");
if(Spieler[playerid][pAdminOnduty] == false)
{
format(string,24,"["#SERVERTAG"]%s",Spieler[playerid][pName]);
SetPlayerName(playerid,string);
SetPlayerScore(playerid,GetPlayerLevel(playerid));
SendClientMessage(playerid,LEUCHTENDESROT,"** Du bist nun im Admindienst **");
TextDrawShowForPlayer(playerid,ADUTYdraw);
Spieler[playerid][pAdminOnduty] = true;
switch(Spieler[playerid][pAdmin])
{
case 1:{aDuty[playerid] = Create3DTextLabel("Supporter",0x7DFF00C7,30.0,40.0,50.0,MAX_STREAM_NAME_DISTANCE,GetPlayerVirtualWorld(playerid),1);SetPlayerColor(playerid,0x7DFF00C7);}
case 2:{aDuty[playerid] = Create3DTextLabel("Moderator",0x00FFFFD3,30.0,40.0,50.0,MAX_STREAM_NAME_DISTANCE,GetPlayerVirtualWorld(playerid),1);SetPlayerColor(playerid,0x00FFFFD3);}
case 3:{aDuty[playerid] = Create3DTextLabel("Administrator",0x00AFFFEE,30.0,40.0,50.0,MAX_STREAM_NAME_DISTANCE,GetPlayerVirtualWorld(playerid),1);SetPlayerColor(playerid,0x00AFFFEE);}
case 4:{aDuty[playerid] = Create3DTextLabel("Techniker",0xFF00F5D9,30.0,40.0,50.0,MAX_STREAM_NAME_DISTANCE,GetPlayerVirtualWorld(playerid),1);SetPlayerColor(playerid,0xFF00F5D9);}
case 5:{aDuty[playerid] = Create3DTextLabel("Super Administrator",0xFF9600FF,30.0,40.0,50.0,MAX_STREAM_NAME_DISTANCE,GetPlayerVirtualWorld(playerid),1);SetPlayerColor(playerid,0xFF9600FF);}
case 6:{aDuty[playerid] = Create3DTextLabel("Server Manager",0xFF4600D8,30.0,40.0,50.0,MAX_STREAM_NAME_DISTANCE,GetPlayerVirtualWorld(playerid),1);SetPlayerColor(playerid,0xFF4600D8);}
case 7:{aDuty[playerid] = Create3DTextLabel("Serverleitung",0xD60A00CF,30.0,40.0,50.0,MAX_STREAM_NAME_DISTANCE,GetPlayerVirtualWorld(playerid),1);SetPlayerColor(playerid,0xD60A00CF);for(new i; i < MAX_PLAYERS; i++) SetPlayerMarkerForPlayer(playerid, i, 0xD60A00CF);}
}
Attach3DTextLabelToPlayer(aDuty[playerid],playerid,0.0,0.0,0.6);
}
else if(Spieler[playerid][pAdminOnduty] == true)
{
SendClientMessage(playerid,LEUCHTENDESROT,"** Du bist nun nicht mehr im Admindienst **");
TextDrawHideForPlayer(playerid,ADUTYdraw);
Delete3DTextLabel(aDuty[playerid]);
ShowPlayerMarkers(0);
SetPlayerMarkerForPlayer( playerid, 0, 0xFFFFFF00 );
SetPlayerColor(playerid, WEISS);
Spieler[playerid][pAdminOnduty] = false;
SetPlayerName(playerid,Spieler[playerid][pName]);
SetPlayerScore(playerid,GetPlayerLevel(playerid));
if(Spieler[playerid][pMaske] == 1 && Spieler[playerid][pFraktion] != 6)
{
SetPlayerScore(playerid,random(50) + 122);
format(string,sizeof(string),"UNKNOWN%i",random(50) + 122);
SetPlayerName(playerid,string);
}
if(Spieler[playerid][pDuty] == 4 && Spieler[playerid][pFraktion] != 6)
{
SetPlayerScore(playerid,random(50) + 122);
format(string,24,"SWAT%i",random(50) + 122);
SetPlayerName(playerid,string);
}
if(Spieler[playerid][pDuty] == 4 && Spieler[playerid][pFraktion] == 6 && Spieler[playerid][pMaske] == 1)
{
SetPlayerScore(playerid,random(50) + 122);
format(string,24,"SEAL%i",random(50) + 122);
SetPlayerName(playerid,string);
}
if(Spieler[playerid][pDuty] == 5 && Spieler[playerid][pFraktion] == 6 && Spieler[playerid][pMaske] == 1)
{
SetPlayerScore(playerid,random(50) + 122);
format(string,24,"RANGER%i",random(50) + 122);
SetPlayerName(playerid,string);
}
}
return 1;
}
Alles anzeigen