Facebook
From Coral Ibis, 6 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 282
  1. public OnPlayerText(playerid, text[])
  2. {
  3.  if( text[0] == '/' && text[1] == '/' )
  4.         {
  5.                 if(GetPVarInt(playerid, "AnimHitPlayerGun")==1)
  6.                 {
  7.                         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 )
  8.                         {
  9.                                 ShowPlayerDialog(playerid, DIALOG_INFO, DIALOG_STYLE_MSGBOX, ""guiopis"Powiadomienie", "Podczas wymuszonej animacji, używanie innych animacji jest zablokowane.", "Akceptuj", "");
  10.                                 return 0;
  11.                         }
  12.                 }
  13.                
  14.                 if(pInfo[playerid][player_bw] != 0)
  15.                 {
  16.                         SendGuiInformation(playerid, ""guiopis"Informacja", "Podczas BW nie można używać animacji.");
  17.                         return 0;
  18.                 }
  19.  
  20.                 new bool: found = false;
  21.             foreach(new anim_id: Anims)
  22.             {
  23.                         if(!isnull(AnimInfo[anim_id][aCommand]))
  24.                         {
  25.                         if(!strcmp(text, AnimInfo[anim_id][aCommand], true))
  26.                         {
  27.                             if(AnimInfo[anim_id][aAction] == 0)
  28.                             {
  29.                                 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);
  30.                                         }
  31.                                         else
  32.                                         {
  33.                             SetPlayerSpecialAction(playerid, AnimInfo[anim_id][aAction]);
  34.                                         }
  35.                                         pInfo[playerid][player_looped_anim] = true;
  36.                                         found = true;
  37.                         }
  38.                 }
  39.             }
  40.                 if(!found) PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  41.                
  42.                 return 0;
  43.         }