Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd, "/dance", true) == 0)
- {
- tmp = strtoknew(cmdtext, idx);
- if(!strlen(tmp) || strlen(tmp) > 2)
- {
- SCM(playerid,COLOR_GRAD1,"Benutzung: /dance [1-4]");
- return 1;
- }
- dancestyle = strval(tmp);
- if(dancestyle < 1 || dancestyle > 4)
- {
- SCM(playerid,COLOR_GRAD1,"Benutzung: /dance [1-4]");
- return 1;
- }
- if(dancestyle == 1)
- {
- SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
- MakeAnimation[playerid] = 1;
- }
- else if(dancestyle == 2)
- {
- SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE2);
- MakeAnimation[playerid] = 1;
- }
- else if(dancestyle == 3)
- {
- SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE3);
- MakeAnimation[playerid] = 1;
- }
- else if(dancestyle == 4)
- {
- SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE4);
- MakeAnimation[playerid] = 1;
- }
- return 1;
- }
- // Onplayerkeystatechange
- if(newkeys & KEY_SPRINT)
- {
- if(MakeAnimation[playerid] == 1)
- {
- ClearAnimations(playerid);
- MakeAnimation[playerid] = 0;
- TextDrawHideForPlayer(playerid,txtAnimHelper);
- SetPlayerSpecialAction(playerid,SPECIAL_ACTION_NONE);
- return 1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement