07.08.2014, 15:12
Doenst work
pawn Код:
CMD:badge(playerid, params[])
{
strmid(sendername, PlayerRPName(playerid), 0, MAX_PLAYER_NAME);
if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 1)
{
if(PlayerInfo[playerid][pPUndercover] == 1)
{
switch(PlayerInfo[playerid][pMember])
{
case 1: format(string, sizeof(string), "* Officer %s clips their badge on.", sendername);
case 2: format(string, sizeof(string), "* Agent %s clips their badge on.", sendername);
default: format(string, sizeof(string), "* Officer %s clips their badge on.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
PlayerInfo[playerid][pPUndercover] = 0;
SetPlayerToTeamColor(playerid);
}
else
{
switch(PlayerInfo[playerid][pMember])
{
case 1: format(string, sizeof(string), "* Officer %s clips their badge off.", sendername);//lspd
case 2: format(string, sizeof(string), "* Agent %s clips their badge off.", sendername);//fbi
default: format(string, sizeof(string), "* Officer %s clips their badge off.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
PlayerInfo[playerid][pPUndercover] = 1;
SetPlayerToTeamColor(playerid);
}
else if(PlayerInfo[playerid][pMember] == 3 || Playerinfo[playerid][pMember] == 4 || Playerinfo[playerid][pMember] == 5)
{
switch(Playerinfo[playerid][pMember])
{
case 3:format(string, sizeof(string), "* Officer %s clips their badge on.", sendername);
case 4:format(string, sizeof(string), "* Paramedic %s clips their badge on.", sendername);
case 5:format(string, sizeof(string), "* Cadet %s clips their badge on.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetPlayerToTeamColor(playerid);
}
else
{
switch(Playerinfo[playerid][pMember])
{
case 3:format(string, sizeof(string), "* Officer %s clips their badge off.", sendername);
case 4:format(string, sizeof(string), "* Paramedic %s clips their badge off.", sendername);
case 5:format(string, sizeof(string), "* Cadet %s clips their badge off.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetPlayerToTeamColor(playerid);
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, " You are not authorized to use that command !");
}
return 1;
}