- public OnPlayerText(playerid, text[])
- {
- if( text[0] == '/' && text[1] == '/' )
- {
- if(GetPVarInt(playerid, "AnimHitPlayerGun")==1)
- {
- if( strfind(text, "/me", true) == -1 && strcmp(text, "/admins") != 0 && strcmp(text, "/akceptujsmierc") != 0 && strcmp(text, "/a") != 0 && strfind(text, "/do", true) == -1 && strfind(text, "/w", true) == -1 && strfind(text, "/bw", true) == -1 && strfind(text, "/report", true) == -1 && strfind(text, "/b", true) == -1 && strfind(text, "/p", true) == -1 )
- {
- ShowPlayerDialog(playerid, DIALOG_INFO, DIALOG_STYLE_MSGBOX, ""guiopis"Powiadomienie", "Podczas wymuszonej animacji, używanie innych animacji jest zablokowane.", "Akceptuj", "");
- return 0;
- }
- }
- if(pInfo[playerid][player_bw] != 0)
- {
- SendGuiInformation(playerid, ""guiopis"Informacja", "Podczas BW nie można używać animacji.");
- return 0;
- }
- new bool: found = false;
- foreach(new anim_id: Anims)
- {
- if(!isnull(AnimInfo[anim_id][aCommand]))
- {
- if(!strcmp(text, AnimInfo[anim_id][aCommand], true))
- {
- if(AnimInfo[anim_id][aAction] == 0)
- {
- ApplyAnimation(playerid, AnimInfo[anim_id][aLib], AnimInfo[anim_id][aName], AnimInfo[anim_id][aSpeed], AnimInfo[anim_id][aOpt1], AnimInfo[anim_id][aOpt2], AnimInfo[anim_id][aOpt3], AnimInfo[anim_id][aOpt4], AnimInfo[anim_id][aOpt5], 1);
- }
- else
- {
- SetPlayerSpecialAction(playerid, AnimInfo[anim_id][aAction]);
- }
- pInfo[playerid][player_looped_anim] = true;
- found = true;
- }
- }
- }
- if(!found) PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
- return 0;
- }