05.03.2011, 12:49
Maybe something like this? I'm a beginner, so yeah test this out.
I think I am missing some things, maybe some experts will quote my post and add a better one
Also to filterscripts line add gl_actions
To stop animation:
or
I think I am missing some things, maybe some experts will quote my post and add a better one
Also to filterscripts line add gl_actions
Код:
new Text:txtAnimHelper; txtAnimHelper = TextDrawCreate(610.0, 400.0,"~r~/stopanim ~w~to stop the animation"); TextDrawUseBox(txtAnimHelper, 0); TextDrawFont(txtAnimHelper, 2); TextDrawSetShadow(txtAnimHelper,0); // no shadow TextDrawSetOutline(txtAnimHelper,1); // thickness 1 TextDrawBackgroundColor(txtAnimHelper,0x000000FF); TextDrawColor(txtAnimHelper,0xFFFFFFFF); TextDrawAlignment(txtAnimHelper,3); if(strcmp(cmdtext, "/dance 1", true) == 0) { SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);// dance 1 return 1; } if(strcmp(cmdtext, "/dance 2", true) == 0) { SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE2);// dance 2 return 1; } if(strcmp(cmdtext, "/dance 3", true) == 0) { SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE3);// dance 3 return 1; } if(strcmp(cmdtext, "/dance 4", true) == 0) { SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE4);// dance 4 return 1; }
Код:
if(strcmp("/stopanim",cmdtext,true) == 0) { ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0); TextDrawHideForPlayer(playerid,txtAnimHelper); return 1; }
Код:
if(strcmp("/stopanim",cmdtext,true) == 0) { ClearPlayerAnimations(playerid) TextDrawHideForPlayer(playerid,txtAnimHelper); } return 1;