CMD:cop(playerid, params[]) { OnePlayAnim(playerid,"SWORD","sword_block",50.0,0,1,1,1,1); return 1; }
CMD:carjacked1(playerid, params[]) { LoopingAnim(playerid,"PED","CAR_jackedLHS",4.0,0,1,1,1,0); return 1; }
OnePlayAnim(playerid,animlib[],animname[], Float:Speed, looping, lockx, locky, lockz, lp)
{
if (gPlayerUsingLoopingAnim[playerid] == 1)
ApplyAnimation(playerid, animlib, animname, Speed, looping, lockx, locky, lockz, lp);
animation[playerid]++;
}
LoopingAnim(playerid,animlib[],animname[], Float:Speed, looping, lockx, locky, lockz, lp)
{
if (gPlayerUsingLoopingAnim[playerid] == 1)
gPlayerUsingLoopingAnim[playerid] = 1;
ApplyAnimation(playerid, animlib, animname, Speed, looping, lockx, locky, lockz, lp);
animation[playerid]++;
}
StopLoopingAnim(playerid)
{
gPlayerUsingLoopingAnim[playerid] = 0;
ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0);
}
PreloadAnimLib(playerid, animlib[])
{
ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0);
}
OnePlayAnim(playerid,animlib[],animname[], Float:Speed, looping, lockx, locky, lockz, lp)
{
if (gPlayerUsingLoopingAnim[playerid] == 1)
ApplyAnimation(playerid, animlib, animname, Speed, looping, lockx, locky, lockz, lp);
ApplyAnimation(playerid, animlib, animname, Speed, looping, lockx, locky, lockz, lp);
ApplyAnimation(playerid, animlib, animname, Speed, looping, lockx, locky, lockz, lp);
animation[playerid]++;
}
LoopingAnim(playerid,animlib[],animname[], Float:Speed, looping, lockx, locky, lockz, lp)
{
if (gPlayerUsingLoopingAnim[playerid] == 1)
gPlayerUsingLoopingAnim[playerid] = 1;
ApplyAnimation(playerid, animlib, animname, Speed, looping, lockx, locky, lockz, lp);
ApplyAnimation(playerid, animlib, animname, Speed, looping, lockx, locky, lockz, lp);
ApplyAnimation(playerid, animlib, animname, Speed, looping, lockx, locky, lockz, lp);
animation[playerid]++;
}
StopLoopingAnim(playerid)
{
gPlayerUsingLoopingAnim[playerid] = 0;
ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0);
ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0);
ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0);
}
PreloadAnimLib(playerid, animlib[])
{
ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0);
ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0);
ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0);
}
Yes now it works, but i have to type /cop 2 times for it to actually work
|
CMD:cop(playerid, params[])
{
OnePlayAnim(playerid,"SWORD","sword_block",50.0,0,1,1,1,1);
OnePlayAnim(playerid,"SWORD","sword_block",50.0,0,1,1,1,1);
OnePlayAnim(playerid,"SWORD","sword_block",50.0,0,1,1,1,1);
return 1;
}