25.09.2011, 00:27
Title says it
Would be nice if you can help!
pawn Код:
if(strcmp(cmd, "/cop", true) == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GiveNameSpace(sendername);
if(PlayerInfo[playerid][pMember] != 1)
{
SendClientMessage(playerid, COLOR_RED, "You are not a cop!");
return 1;
}
if (!PlayerToPoint(15, playerid,255.3,77.4,1003.6))
{
SendClientMessage(playerid, COLOR_RED, "Your not at the duty point!");
return 1;
}
if(OnDuty[playerid] !=0)
{
if(PlayerInfo[playerid][pRank] == 16) { format(string, sizeof(string), "** Chief Of Police %s is now on duty **", sendername); }
else if(PlayerInfo[playerid][pRank] == 15) { format(string, sizeof(string), "** Chief Of Police %s is now on duty **", sendername); }
else if(PlayerInfo[playerid][pRank] == 14) { format(string, sizeof(string), "** Chief Of Police %s is now on duty **", sendername); }
else if(PlayerInfo[playerid][pRank] == 13) { format(string, sizeof(string), "** Chief Of Police %s is now on duty **", sendername); }
else if(PlayerInfo[playerid][pRank] == 12) { format(string, sizeof(string), "** Chief Of Police %s is now on duty **", sendername); }
else if(PlayerInfo[playerid][pRank] == 11) { format(string, sizeof(string), "** Chief Of Police %s is now on duty **", sendername); }
else if(PlayerInfo[playerid][pRank] == 10) { format(string, sizeof(string), "** Deputy Chief %s is now on duty **", sendername); }
else if(PlayerInfo[playerid][pRank] == 9) { format(string, sizeof(string), "** Commander %s is now on duty **", sendername); }
else if(PlayerInfo[playerid][pRank] == 8) { format(string, sizeof(string), "** Lieutenant %s is now on duty **", sendername); }
else if(PlayerInfo[playerid][pRank] == 7) { format(string, sizeof(string), "** Staff Sargeant %s is now on duty **", sendername); }
else if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Sargeant %s is now on duty **", sendername); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Senior Lead Officer %s is now on duty **", sendername); } }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Lead Offier %s is now on duty **", sendername); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Police Officer II %s is now on duty **", sendername); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Police Officer I %s is now on duty **", sendername); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Student %s is now on duty **", sendername); }
else { format(string, sizeof(string), "** Student %s is now off duty **", sendername); }
SendFamilyMessage(PlayerInfo[playerid][pMember], TEAM_BLUE_COLOR, string);
SetPlayerColor(playerid,TEAM_BLUE_COLOR);
OnDuty[playerid] = 1;
return 1;
}
else if(OnDuty[playerid] !=1)
{
if(PlayerInfo[playerid][pRank] == 16) { format(string, sizeof(string), "** Chief Of Police %s is now off duty **", sendername); }
else if(PlayerInfo[playerid][pRank] == 15) { format(string, sizeof(string), "** Chief Of Police %s is now off duty **", sendername); }
else if(PlayerInfo[playerid][pRank] == 14) { format(string, sizeof(string), "** Chief Of Police %s is now off duty **", sendername); }
else if(PlayerInfo[playerid][pRank] == 13) { format(string, sizeof(string), "** Chief Of Police %s is now off duty **", sendername); }
else if(PlayerInfo[playerid][pRank] == 12) { format(string, sizeof(string), "** Chief Of Police %s is now off duty **", sendername); }
else if(PlayerInfo[playerid][pRank] == 11) { format(string, sizeof(string), "** Chief Of Police %s is now off duty **", sendername); }
else if(PlayerInfo[playerid][pRank] == 10) { format(string, sizeof(string), "** Deputy Chief %s is now off duty **", sendername); }
else if(PlayerInfo[playerid][pRank] == 9) { format(string, sizeof(string), "** Commander %s is now off duty **", sendername); }
else if(PlayerInfo[playerid][pRank] == 8) { format(string, sizeof(string), "** Lieutenant %s is now off duty **", sendername); }
else if(PlayerInfo[playerid][pRank] == 7) { format(string, sizeof(string), "** Staff Sargeant %s is now off duty **", sendername); }
else if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Sargeant %s is now off duty **", sendername); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Senior Lead Officer %s is now off duty **", sendername); } }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Lead Offier %s is now off duty **", sendername); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Police Officer II %s is now off duty **", sendername); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Police Officer I %s is now off duty **", sendername); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Student %s is now off duty **", sendername); }
else { format(string, sizeof(string), "** Student %s is now off duty **", sendername); }
ResetPlayerWeaponsEx(playerid);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 0);
SendFamilyMessage(PlayerInfo[playerid][pMember], TEAM_BLUE_COLOR, string);
SetPlayerColor(playerid,TEAM_HIT_COLOR);
OnDuty[playerid] = 0;
}
return 1;
}