Mohamed

  • Full Member
  • Regards, We3da
  • Posts: 247
Command To Test An Anim
«  »
Hi, i Made Just a Sample Command To Test Anim, To work of thi Use /animstest <ID> <ID>
Example: /animstest 0 0
Code: [Select]
if ( cmd == "animstest" || cmd == "testanims")
{
if(!text) MessagePlayer("[ANIM TEST] /"+cmd+" <ID> <ID>", player );
else {
local anim = GetTok( text, " ", 1);
if ( !anim ) MessagePlayer("Make a ID For Anim 1 First..",player);
else if (!IsNum(anim)) MessagePlayer("ID's Must Be In Numbers..",player);
else {
local anim1 = GetTok( text, " ", 1);
if ( !anim1 ) MessagePlayer("Make a ID For Anim 2 First..",player);
else if (!IsNum(anim1)) MessagePlayer("ID's Must Be In Numbers..",player);
else {
player.SetAnim(anim.tointeger(),anim1.tointeger());
}
}
}
}

Don't Forget The Two Functions:-
Code: [Select]
function GetTok(string, separator, n, ...)
 {
 local m = vargv.len() > 0 ? vargv[0] : n,
 tokenized = split(string, separator),
 text = "";
 if (n > tokenized.len() || n < 1) return null;
 for (; n <= m; n++)
  {
  text += text == "" ? tokenized[n-1] : separator + tokenized[n-1];
  }
 return text;
 }
 
 function NumTok(string, separator)
 {
 local tokenized = split(string, separator);
 return tokenized.len();
 }
Feel Free To PM Me For Any Support, I'm Care.
Anyway u can Contact Me Ingame!
Ingame Name: [AFt]We3da^
My Own Server: ViceEvil Server

=RK=MarineForce

  • Sr. Member
  • WAR IS HELL!
  • Posts: 445
Try to UnderStand ME!