Guten Tag, mal wieder.
Ich habe mal wieder ein Problem mit den Commands -.-"
Könnte sich ie Mal wer angucken? Beschreibungen stehen dran.
Kümmert euch am besten nicht um die länge
Nur um die Funktionalitäten :3
Aduty System:
Mann ist Admin lvl.7 aber es kommt die Nachricht dass ein T-Supporter nun Online ist.
ocmd:aduty(playerid, params[])
{
if(IsPlayerAnAdmin(playerid,1))
{
if(Aduty[playerid] == false)
{
Aduty[playerid] = true;
SendClientMessage(playerid,Rot,"Du bist nun im Test-Supporter-Dienst");
SendClientMessageToAll(Rot,"Ein Test-Supporter meldet sich zum Dienst");
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
strins(pName,"[LA]",0);
SetPlayerName(playerid,pName);
}
else
{
Aduty[playerid] = false;
SendClientMessage(playerid,Rot,"Du bist nun nicht mehr im Test-Supporter-Dienst");
SendClientMessageToAll(Rot,"Ein Test-Supporter hat sich vom Dienst abgemeldet");
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
strdel(pName,0,4);
SetPlayerName(playerid,pName);
}
}
else if(IsPlayerAnAdmin(playerid,2))
{
if(Aduty[playerid] == false)
{
Aduty[playerid] = true;
SendClientMessage(playerid,Rot,"Du bist nun im Supporter-Dienst");
SendClientMessageToAll(Rot,"Ein Supporter meldet sich zum Dienst");
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
strins(pName,"[LA]",0);
SetPlayerName(playerid,pName);
}
else
{
Aduty[playerid] = false;
SendClientMessage(playerid,Rot,"Du bist nun nicht mehr im Supporter-Dienst");
SendClientMessageToAll(Rot,"Ein Supporter hat sich vom Dienst abgemeldet");
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
strdel(pName,0,4);
SetPlayerName(playerid,pName);
}
}
else if(IsPlayerAnAdmin(playerid,3))
{
if(Aduty[playerid] == false)
{
Aduty[playerid] = true;
SendClientMessage(playerid,Rot,"Du bist nun im Test-Admin-Dienst");
SendClientMessageToAll(Rot,"Ein Test-Admin meldet sich zum Dienst");
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
strins(pName,"[LA]",0);
SetPlayerName(playerid,pName);
}
else
{
Aduty[playerid] = false;
SendClientMessage(playerid,Rot,"Du bist nun nicht mehr im Test-Admin-Dienst");
SendClientMessageToAll(Rot,"Ein Test-Admin hat sich vom Dienst abgemeldet");
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
strdel(pName,0,4);
SetPlayerName(playerid,pName);
}
}
else if(IsPlayerAnAdmin(playerid,4))
{
if(Aduty[playerid] == false)
{
Aduty[playerid] = true;
SendClientMessage(playerid,Rot,"Du bist nun im Admin-Dienst");
SendClientMessageToAll(Rot,"Ein Admin meldet sich zum Dienst");
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
strins(pName,"[LA]",0);
SetPlayerName(playerid,pName);
}
else
{
Aduty[playerid] = false;
SendClientMessage(playerid,Rot,"Du bist nun nicht mehr im Admin-Dienst");
SendClientMessageToAll(Rot,"Ein Admin hat sich vom Dienst abgemeldet");
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
strdel(pName,0,4);
SetPlayerName(playerid,pName);
}
}
else if(IsPlayerAnAdmin(playerid,5))
{
if(Aduty[playerid] == false)
{
Aduty[playerid] = true;
SendClientMessage(playerid,Rot,"Du bist nun im Head-Admin-Dienst");
SendClientMessageToAll(Rot,"Ein Head-Admin meldet sich zum Dienst");
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
strins(pName,"[LA]",0);
SetPlayerName(playerid,pName);
}
else
{
Aduty[playerid] = false;
SendClientMessage(playerid,Rot,"Du bist nun nicht mehr im Head-Admin-Dienst");
SendClientMessageToAll(Rot,"Ein Head-Admin hat sich vom Dienst abgemeldet");
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
strdel(pName,0,4);
SetPlayerName(playerid,pName);
}
}
else if(IsPlayerAnAdmin(playerid,6))
{
if(Aduty[playerid] == false)
{
Aduty[playerid] = true;
SendClientMessage(playerid,Rot,"Du bist nun im Servermanager-Dienst");
SendClientMessageToAll(Rot,"Ein Servermanager meldet sich zum Dienst");
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
strins(pName,"[LA]",0);
SetPlayerName(playerid,pName);
}
else
{
Aduty[playerid] = false;
SendClientMessage(playerid,Rot,"Du bist nun nicht mehr im Servermanager-Dienst");
SendClientMessageToAll(Rot,"Ein Servermanager hat sich vom Dienst abgemeldet");
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
strdel(pName,0,4);
SetPlayerName(playerid,pName);
}
}
else if(IsPlayerAnAdmin(playerid,7))
{
if(Aduty[playerid] == false)
{
Aduty[playerid] = true;
SendClientMessage(playerid,Rot,"Du bist nun im Projektleiter-Dienst");
SendClientMessageToAll(Rot,"Ein Projektleiter meldet sich zum Dienst");
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
strins(pName,"[LA]",0);
SetPlayerName(playerid,pName);
}
else
{
Aduty[playerid] = false;
SendClientMessage(playerid,Rot,"Du bist nun nicht mehr im Projektleiter-Dienst");
SendClientMessageToAll(Rot,"Ein Projektleiter hat sich vom Dienst abgemeldet");
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
strdel(pName,0,4);
SetPlayerName(playerid,pName);
}
}
else
{
SendClientMessage(playerid,Rot,"Diesen Befehl kannst du nicht nutzen.");
return 1;
}
return 1;
}
Teleport System:
Es wird anscheinend jedem die Nachricht gesendet dass einer Teleportiert wurde.
Diese Nachricht soll aber nur für den jenigen Admin, und den Spieler kommen.
ocmd:goto(playerid,params[])
{
if(IsPlayerAnAdmin(playerid,1))
{
new string[128],player;
if(sscanf(params,"u",player))return SendClientMessage(playerid,Blau,"INFO: /goto [Spieler ID]");
if(IsPlayerAnAdmin(playerid,1))
{
new sendername[MAX_PLAYER_NAME];
GetPlayerName(player,sendername,sizeof sendername);
format(string,sizeof string,"Du hast dich zu %s geportet.",sendername);
SendClientMessage(playerid,Blau,string);
new Float:X,Float:Y,Float:Z;
GetPlayerPos(player,X,Y,Z);
if(IsPlayerInAnyVehicle(playerid))
{
new autoid = GetPlayerVehicleID(playerid);
SetVehiclePos(autoid, X, Y+4, Z);
}
else
{
SetPlayerPos(playerid,X,Y+2,Z);
}
}
}
else
{
SendClientMessage(playerid,Rot,"Diesen Befehl kannst du nicht nutzen.");
}
return 1;
}
dass selbe beim herporten.
ocmd:gethere(playerid,params[])
{
if(IsPlayerAnAdmin(playerid,1))
{
new string[128],player;
if(sscanf(params,"u",player))return SendClientMessage(playerid,Blau,"INFO: /gethere [Spieler]");
if(IsPlayerAnAdmin(playerid,1))
{
new sendername[MAX_PLAYER_NAME],playername[MAX_PLAYER_NAME];
GetPlayerName(player,sendername,sizeof sendername);
GetPlayerName(playerid,playername,sizeof playername);
format(string,sizeof string,"Admin %s hat dich zu sich geportet.",playername);
SendClientMessage(player,Blau,string);
format(string,sizeof string,"Du hast %s zu dir geportet.",sendername);
SendClientMessage(playerid,Blau,string);
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
if(IsPlayerInAnyVehicle(player))
{
new autoid = GetPlayerVehicleID(player);
SetVehiclePos(autoid, X, Y+4, Z);
}
else
{
SetPlayerPos(player,X,Y+2,Z);
}
}
}
else
{
SendClientMessage(playerid, Rot,"Diesen Befehl kannst du nicht nutzen.");
}
return 1;
}
Es wäre toll würde mir dort jemand ne Lösung vorschlagen können.