anim - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: anim (
/showthread.php?tid=478662)
anim -
Mattakil - 30.11.2013
instead of showing the UsageMessage, the command returns 0. I've never done multiple strings in one command before
pawn Код:
CMD:anim(playerid, params[])
{
new lib[100], anim[100];
if(sscanf(params, "s[100]s[100]", lib, anim)) return UsageMessage(pid, "/anim [library][anim]");
ApplyAnimation(playerid, lib, anim, 4.1, 1, 1, 1, 1, 1, 1);
return 1;
}
its to test animations btw
Re: anim -
Danialdano - 30.11.2013
You mean like this?
pawn Код:
CMD:anim(playerid, params[]) // Made by Wizza
{
new lib;
if(sscanf(params, "i", animid)) return SendClientMessage(playerid, COLOR_WHITE, "/anim [library][anim]");
if(lib< 1 || lib> 2) return SendClientMessage(playerid, COLOR_WHITE, "Library is between 1-2");
switch(lib)
{
case 1: ApplyAnimation(playerid,"BEACH","bather",4.0,1,0,0,0,0);
case 2: Different anim here
}
return 1;
}
Re: anim -
Mattakil - 30.11.2013
no. I want to test animations, so you would type /anim [library][animname] and it applies it.
Re: anim -
Konstantinos - 30.11.2013
Using more than 1 string is messed up. I'd use it as:
pawn Код:
CMD:anim(playerid, params[])
{
if(isnull(params)) return SendClientMessage(playerid, -1, "/anim [library,anim]");
new lib[15], anim[30];
sscanf(params, "p<,>s[15]s[30]", lib, anim);
ApplyAnimation(playerid, lib, anim, 4.1, 1, 1, 1, 1, 1, 1);
return 1;
}
But you should separate the two strings with a comma: /anim PED,WALK_DRUNK
Re: anim -
Mattakil - 30.11.2013
you know..it really helps when your amx is in the gamemodes after compiling. q.q