Код:
#include <a_samp>

new bool:Baton[MAX_PLAYERS];

main()
{
print("\n----------------------------------");
print(" Скрипт жезла загружен");
print("----------------------------------\n");
}

public OnPlayerConnect(playerid)
{
    Baton[playerid] = false;
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
    Baton[playerid] = false;
    PreloadAnimLib(playerid,"PED");
PreloadAnimLib(playerid,"CARRY");
    return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/palka", cmdtext, true, 10) == 0 || strcmp(cmd,"/zl",true, 10)==0))
{
if(Baton[playerid] == false)
{
   SetPlayerAttachedObject(playerid, 1, 1214, 6, -0.040454, 0.028840, -0.012862, 2.521301, 76.277267, 70.163467, 0.311789, 0.312000, 0.458441);
   ApplyAnimation(playerid, "PED", "Driveby_R", 4.1, 0, 1, 1, 1, 1, 1);
   Baton[playerid] = true;
}
else if(Baton[playerid] == true)
{
   if(IsPlayerAttachedObjectSlotUsed(playerid, 1)) RemovePlayerAttachedObject(playerid, 1);
   ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0);
   Baton[playerid] = false;
}
return 1;
}
return 0;
}
PreloadAnimLib(playerid, animlib[]) return ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0);
Код:
if(PlayerInfo[playerid][pLeader] != 1 || PlayerInfo[playerid][pMember] != 1) return SendClientMessage(playerid,-1,"Ты не мент");