Код:
CMD:rap(playerid, params[])
{
new animid;
if(IsPlayerCuffed(playerid) || IsPlayerInAnyVehicle(playerid) || IsPlayerTied(playerid))
{
SendClientMessage(playerid, COLOR_GREY, "You can't do this right now.");
return 1;
}
if(sscanf(params, "i", animid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /rap [1-3]");
if(animid < 1 || animid > 3) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /rap [1-3]");
switch(animid)
{
case 1: {LoopingAnim(playerid,"RAPPING","RAP_A_Loop",4.0,1,1,1,1,0); LoopingAnim(playerid,"RAPPING","RAP_A_Loop",4.0,1,1,1,1,0);}
case 2: {LoopingAnim(playerid,"RAPPING","RAP_B_Loop",4.0,1,1,1,1,0); LoopingAnim(playerid,"RAPPING","RAP_B_Loop",4.0,1,1,1,1,0);}
case 3: {LoopingAnim(playerid,"RAPPING","RAP_C_Loop",4.0,1,1,1,1,0); LoopingAnim(playerid,"RAPPING","RAP_C_Loop",4.0,1,1,1,1,0);}
}
return 1;
}