PHP код:
CMD:DoCdiv(playerid, params[])
{
if(PlayerInfo[playerid][pMember] == 3 && PlayerInfo[playerid][pRank] >= 5)
{
new string[128], giveplayerid, division;
if(sscanf(params, "ud", giveplayerid, division))
{
SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /DoCdiv [playerid] [division]");
SendClientMessageEx(playerid, COLOR_GRAD2, "Available division names: 0 (None), 1 (HR), 2 (GU), 3 (PTR), 4 (SO)");
return 1;
}
if(IsPlayerConnected(giveplayerid))
{
if(PlayerInfo[playerid][pMember] == 3 && PlayerInfo[playerid][pRank] >= 5)
{
if(division == 0)
{
if (PlayerInfo[giveplayerid][pMember] == 3)
{
PlayerInfo[giveplayerid][pDivision] = 0;
format(string, sizeof(string), "You have been kicked from your division by %s.", GetPlayerNameEx(playerid));
SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "You have kicked %s out of their division.", GetPlayerNameEx(giveplayerid));
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
}
}
else if(division == 1)
{
if (PlayerInfo[giveplayerid][pMember] == 3)
{
PlayerInfo[giveplayerid][pDivision] = 1;
format(string, sizeof(string), "You are now in the Human Resources division, invited by %s.", GetPlayerNameEx(playerid));
SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "You have invited %s to join the Human Resources division.", GetPlayerNameEx(giveplayerid));
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
}
}
else if(division == 2)
{
if (PlayerInfo[giveplayerid][pMember] == 3)
{
PlayerInfo[giveplayerid][pDivision] = 2;
format(string, sizeof(string), "You are now in the Gang Unit, invited by %s.", GetPlayerNameEx(playerid));
SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "You have invited %s to join the Gang Unit division.", GetPlayerNameEx(giveplayerid));
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
}
}
else if(division == 3)
{
if (PlayerInfo[giveplayerid][pMember] == 3)
{
PlayerInfo[giveplayerid][pDivision] = 3;
format(string, sizeof(string), "You are now in the Prisoner Transport division, invited by %s.", GetPlayerNameEx(playerid));
SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "You have invited %s to join the Prisoner Transport division.", GetPlayerNameEx(giveplayerid));
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
}
}
else if(division == 4)
{
if (PlayerInfo[giveplayerid][pMember] == 3)
{
PlayerInfo[giveplayerid][pDivision] = 4;
format(string, sizeof(string), "You are now in the Special Operations division, invited by %s.", GetPlayerNameEx(playerid));
SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "You have invited %s to join the Special Operations division.", GetPlayerNameEx(giveplayerid));
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
}
}
}
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command - only R5+ can do this.");
}
}
return 1;
}
PHP код:
CMD:DoC(playerid, params[])
{
if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
{
if(IsPlayerInRangeOfPoint(playerid, 4.0, 293.675415, 188.238296, 1007.171875+0.6))
{
ShowPlayerDialog(playerid, DIALOG_DoC, DIALOG_STYLE_LIST, "DoC: Lockers", "Toggle Duty\nEquipment\nClothing Selection\nClear Suspect", "Proceed", "Cancel");
}
else
{
SendClientMessageEx(playerid, COLOR_WHITE, "You aren't in range of your DoC lockers.");
}
}
return 1;
}
pawn Код:
CMD:doc(playerid, params[])
{
if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
{
if(IsPlayerInRangeOfPoint(playerid, 4.0, 293.675415, 188.238296, 1007.171875+0.6))
{
ShowPlayerDialog(playerid, DIALOG_DoC, DIALOG_STYLE_LIST, "DoC: Lockers", "Toggle Duty\nEquipment\nClothing Selection\nClear Suspect", "Proceed", "Cancel");
}
else
{
SendClientMessageEx(playerid, COLOR_WHITE, "You aren't in range of your DoC lockers.");
return 1;
}
}
return 1;
}