03.10.2015, 09:33
Well actually your badge cmd works just fine, just change it's name to duty
for the dutybelt cmd
just put this under your dutybelt, after that an officer needs to /duty to get his duty status, and then needs to /dutybelt to get his weapons
is this the same thing you want ?
if you want your /duty cmd to give those guns too, just put the same code under
SendClientMessage(playerid, WHITE, "You have attached your badge, and are now being identified as on duty.");
in your duty command
PHP код:
command(duty, playerid, params[])
{
if(Player[playerid][Group] >= 1)
{
if(Groups[Player[playerid][Group]][CommandTypes] == 1 || Groups[Player[playerid][Group]][CommandTypes] == 4)
{
if(Player[playerid][CopDuty] == 0)
{
SetPlayerColor(playerid, Groups[Player[playerid][Group]][GroupColour] * 256 + 255);
SendClientMessage(playerid, WHITE, "You have attached your badge, and are now being identified as on duty.");
Player[playerid][CopDuty] = 1;
}
else
{
SetPlayerColor(playerid, 0xFFFFFFFF);
SendClientMessage(playerid, WHITE, "You have deattached your badge, and are now being identified as off duty.");
Player[playerid][CopDuty] = 0;
}
}
}
return 1;
}
PHP код:
if(Player[playerid][CopDuty] == 1)
{
GivePlayerWeapon(playerid, 24, 100); //desert eagle
GivePlayerWeapon(playerid, 25, 50); //shotgun
GivePlayerWeapon(playerid, 29, 200); //mp5
GivePlayerWeapon(playerid, 3, 1); //nitestick
GivePlayerWeapon(playerid, 41, 400); //spray can
}
is this the same thing you want ?
if you want your /duty cmd to give those guns too, just put the same code under
SendClientMessage(playerid, WHITE, "You have attached your badge, and are now being identified as on duty.");
in your duty command