//------------------------------------------------------------------------------
if(strcmp(cmd,"/жезл",true)==0)
{
//new sendername[MAX_PLAYER_NAME];
if(IsACop(playerid))
{
if(Baton[playerid] == 2)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s достал жезл", sendername);
SetPlayerAttachedObject(playerid, 1, 1214, 6, -0.040454, 0.028840, -0.012862, 2.521301, 76.277267, 70.163467, 0.727886, 1.000000, 0.558441);
ApplyAnimation(playerid, "PED", "Driveby_R", 4.1, 0, 1, 1, 1, 1, 1);
Baton[playerid] = 1;
SendClientMessage(playerid, COLOR_LIGHTRED,"Вы достали жезл!");
ProxDetector(30.0, playerid, string,COLOR_RED,COLOR_RED,COLOR_RED,0,0);
}
else if(Baton[playerid] == 1)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(IsPlayerAttachedObjectSlotUsed(playerid, 1)) RemovePlayerAttachedObject(playerid, 1);
ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0);
SendClientMessage(playerid, COLOR_LIGHTRED,"Вы убрали жезл!");
format(string, sizeof(string), "* %s убрал жезл", sendername);
ProxDetector(30.0, playerid, string,COLOR_RED,COLOR_RED,COLOR_RED,0,0);
Baton[playerid] = 2;
}
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED,"Вы не коп!");
return 1;
}
return 1;
}
//==============================================================================