rendered paste bodyIsNumeric(const string[]) //needed for numeric function of command
{
for (new i = 0, j = strlen(string); i < j; i++)
{
if (string[i] > '9' || string[i] < '0') return 0;
}
return 1;
}
COMMAND:secta(playerid, params[])
{
new animLib[50], animName[50];
if(!IsPlayerAdmin(playerid)) // Alternate would be your admin system.
{
return 0;
}
else
{
if(sscanf(params, "s[50]s[50]", animLib, animName)) SendClientMessage(playerid, 0xFFFFFFFF, "[ ! ] Error! Use: /secta AnimLib AnimName");
if(IsNumeric(animLib) || IsNumeric(animName))
{
SendClientMessage(playerid, 0xFFFFFFFF, "[ ! ] Invalid. No numeric values allowed.");
}
else
{
SendClientMessage(playerid, 0xFFFFFFFF, "[ ! ] Command recognized. Be careful when using secta.");
ApplyAnimation(playerid, animLib[0], animName[0], 4.0,0,0,0,0,0,1);
}
}
return true;
}