Titel sagt alles!
CODES:
if (strcmp(cmd, "/adminduty", true) == 0 || strcmp(cmd, "/aduty", true) == 0)
{
if(AdminDuty[playerid] == 0)
{
if(PlayerInfo[playerid][pAdmin] == 1)
{
SetPlayerColor(playerid,0x00FFEE);
AdminDuty[playerid] = 1;
Mod[playerid] = Create3DTextLabel("NICHT ANGREIFEN!!! ADMIN ON DUTY!!",0xFF0A00FF,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Mod[playerid], playerid, 0.0, 0.0, 0.4);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof(string),"SERVER: Moderator %s ist nun als Admin im Dienst!",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
SetPlayerHealth(playerid, 100000000);
SetPlayerArmour(playerid, 100000000);
GivePlayerWeapon(playerid, 38, 999999);
return 1;
}
else if(PlayerInfo[playerid][pAdmin] == 2)
{
SetPlayerColor(playerid,0x00FFEE);
AdminDuty[playerid] = 1;
Mod[playerid] = Create3DTextLabel("NICHT ANGREIFEN!!! ADMIN ON DUTY!!",0xFF0A00FF,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Mod[playerid], playerid, 0.0, 0.0, 0.4);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof(string),"SERVER: Super-Moderator %s ist nun als Admin im Dienst!",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
SetPlayerHealth(playerid, 100000000);
SetPlayerArmour(playerid, 100000000);
GivePlayerWeapon(playerid, 38, 999999);
return 1;
}
else if(PlayerInfo[playerid][pAdmin] == 3)
{
SetPlayerColor(playerid,0x00FFEE);
AdminDuty[playerid] = 1;
Supermod[playerid] = Create3DTextLabel("NICHT ANGREIFEN!!! ADMIN ON DUTY!!",0xFF0A00FF,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Supermod[playerid], playerid, 0.0, 0.0, 0.4);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof(string),"SERVER: Adminstrator %s ist nun als Admin im Dienst!",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
SetPlayerHealth(playerid, 100000000);
SetPlayerArmour(playerid, 100000000);
GivePlayerWeapon(playerid, 38, 999999);
return 1;
}
else if(PlayerInfo[playerid][pAdmin] ==1337)
{
SetPlayerColor(playerid,0x00FFEE);
AdminDuty[playerid] = 1;
Admin[playerid] = Create3DTextLabel("NICHT ANGREIFEN!!! ADMIN ON DUTY!!",0xFF0A00FF,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Admin[playerid], playerid, 0.0, 0.0, 0.4);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof(string),"SERVER: Head Admin %s ist nun als Admin im Dienst!",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
SetPlayerHealth(playerid, 100000000);
SetPlayerArmour(playerid, 100000000);
GivePlayerWeapon(playerid, 38, 999999);
return 1;
}
else if(PlayerInfo[playerid][pAdmin] ==1338)
{
SetPlayerColor(playerid,0x00FFEE);
AdminDuty[playerid] = 1;
Admin[playerid] = Create3DTextLabel("NICHT ANGREIFEN!!! ADMIN ON DUTY!!",0xFF0A00FF,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Admin[playerid], playerid, 0.0, 0.0, 0.4);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof(string),"SERVER: Global Adminstrator %s ist nun als Admin im Dienst!",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
SetPlayerHealth(playerid, 100000000);
SetPlayerArmour(playerid, 100000000);
GivePlayerWeapon(playerid, 38, 999999);
return 1;
}
else if(PlayerInfo[playerid][pAdmin] ==2000)
{
SetPlayerColor(playerid,0x00FFEE);
AdminDuty[playerid] = 1;
Admin[playerid] = Create3DTextLabel("NICHT ANGREIFEN!!! ADMIN ON DUTY!!",0xFF0A00FF,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Admin[playerid], playerid, 0.0, 0.0, 0.4);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof(string),"SERVER: High Admin %s ist als Admin im Dienst! ",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
SetPlayerHealth(playerid, 100000000);
SetPlayerArmour(playerid, 100000000);
GivePlayerWeapon(playerid, 38, 999999);
return 1;
}
else if(PlayerInfo[playerid][pAdmin] ==2001)
{
SetPlayerColor(playerid,0x00FFEE);
AdminDuty[playerid] = 1;
Admin[playerid] = Create3DTextLabel("NICHT ANGREIFEN!!! ADMIN ON DUTY!!",0xFF0A00FF,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Admin[playerid], playerid, 0.0, 0.0, 0.4);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof(string),"SERVER: Stelv. Projektleiter %s ist nun als Admin im Dienst!",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
SetPlayerHealth(playerid, 100000000);
SetPlayerArmour(playerid, 100000000);
GivePlayerWeapon(playerid, 38, 999999);
return 1;
}
else if(PlayerInfo[playerid][pAdmin] >=2002)
{
SetPlayerColor(playerid,0x00FFEE);
AdminDuty[playerid] = 1;
Admin[playerid] = Create3DTextLabel("NICHT ANGREIFEN!!! ADMIN ON DUTY!!",0xFF0A00FF,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Admin[playerid], playerid, 0.0, 0.0, 0.4);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof(string),"!SERVER: Projektleiter %s ist nun als Admin On-Duty!",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
SetPlayerHealth(playerid, 100000000);
SetPlayerArmour(playerid, 100000000);
GivePlayerWeapon(playerid, 38, 999999);
return 1;
}
else if(PlayerInfo[playerid][pAdmin] >=2003)
{
SetPlayerColor(playerid,0x00FFEE);
AdminDuty[playerid] = 1;
Admin[playerid] = Create3DTextLabel("NICHT ANGREIFEN!!! ADMIN ON DUTY!!",0xFF0A00FF,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Admin[playerid], playerid, 0.0, 0.0, 0.4);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof(string),"SERVER: Scripter %s ist nun im Dienst",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
SetPlayerHealth(playerid, 100000000);
SetPlayerArmour(playerid, 100000000);
GivePlayerWeapon(playerid, 38, 999999);
return 1;
}
else if(PlayerInfo[playerid][pSupporter] >= 1)
{
SetPlayerColor(playerid,0x00FFEE);
AdminDuty[playerid] = 1;
Supporter[playerid] = Create3DTextLabel("NICHT ANGREIFEN!!! SUPPORTER ON DUTY!!",0xFF0A00FF,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Supporter[playerid], playerid, 0.0, 0.0, 0.4);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof(string),"SERVER: Supporter %s ist nun im Dienst",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
SetPlayerHealth(playerid, 100000000);
SetPlayerArmour(playerid, 100000000);
GivePlayerWeapon(playerid, 38, 999999);
return 1;
}
}
if(AdminDuty[playerid] == 1)
{
if(PlayerInfo[playerid][pAdmin] == 1)
{
format(string,sizeof(string),"Moderator %s ist nun Off Duty!",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
}
if(PlayerInfo[playerid][pAdmin] == 2)
{
format(string,sizeof(string),"Super-Moderator %s ist nun Off Duty!",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
}
else if(PlayerInfo[playerid][pAdmin] == 3)
{
format(string,sizeof(string),"Adminstrator %s ist nun Off Duty!",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
}
else if(PlayerInfo[playerid][pAdmin] >=1337)
{
format(string,sizeof(string),"Head Admin %s ist nun Off Duty.",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
}
else if(PlayerInfo[playerid][pAdmin] >=1338)
{
format(string,sizeof(string),"Global Adminstrator ist nun Off Duty!",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
}
else if(PlayerInfo[playerid][pAdmin] >=2000)
{
format(string,sizeof(string),"High Admin %s ist nun Off Duty.",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
}
else if(PlayerInfo[playerid][pAdmin] >=2001)
{
format(string,sizeof(string),"stlv. Projektleiter %s ist nun Off Duty!",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
}
else if(PlayerInfo[playerid][pAdmin] >=2002)
{
format(string,sizeof(string),"Projektleiter & Scripter %s ist nun Off Duty.",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
}
else if(PlayerInfo[playerid][pAdmin] >=2003)
{
format(string,sizeof(string),"Scripter %s ist nun Off Duty.",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
}
else if(PlayerInfo[playerid][pSupporter] >= 1)
{
format(string,sizeof(string),"Supporter %s ist nun Off Duty.",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
}
Delete3DTextLabel(Admin[playerid]);
Delete3DTextLabel(Supermod[playerid]);
Delete3DTextLabel(Mod[playerid]);
Delete3DTextLabel(Supporter[playerid]);
Delete3DTextLabel(Admin[playerid]);
Delete3DTextLabel(Supermod[playerid]);
Delete3DTextLabel(Mod[playerid]);
Delete3DTextLabel(Supporter[playerid]);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 0);
SetPlayerAmmo(playerid, WEAPON_MINIGUN, 0);
AdminDuty[playerid] = 0;
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
SetPlayerColor(playerid, NAMECOLOR_LSCOP);
}
else
{
SetPlayerColor(playerid,TEAM_HIT_COLOR);
}
}
return 1;
}
return 1;
}
________________________________
if(strcmp(cmd, "/slap", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "NUTZUNG: /slap [playerid]");
return 1;
}
new playa;
new Float:shealth;
new Float:slx, Float:sly, Float:slz;
playa = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >=4)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerHealth(playa, shealth);
SetPlayerHealth(playa, shealth-5);
GetPlayerPos(playa, slx, sly, slz);
SetPlayerPos(playa, slx, sly, slz+5);
PlayerPlaySound(playa, 1130, slx, sly, slz+5);
printf("AdmCmd: %s slapped %s",sendername, giveplayer);
new slrand = random(4);
if(slrand == 0) format(string, sizeof(string), "[SYS:] %s hat %s geslappt",sendername,giveplayer);
else if(slrand == 1) format(string, sizeof(string), "[SYS:] %s hat %s geslappt.",sendername,giveplayer);
else if(slrand == 2) format(string, sizeof(string), "[SYS:] %s hat %s geslappt.",giveplayer,sendername);
else format(string, sizeof(string), "[SYS:] %s hat %s geslappt.",giveplayer,sendername);
ABroadCast(COLOR_LIGHTRED,string,1);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Das darfst du nicht tun!");
}
}
return 1;
}