I need crates animation.
#1

Can someone shows me how can I make carrying crates animation?

For the example, Button Y is to carry crates (animation started) and button N is to drop the crates (animation stopped).
Reply
#2

On top of script:
Код:
#define PRESSED(%0) \
	(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
Now:

Код:
public OnPlayerConnect(playerid)
{
	SetPVarInt(playerid,"Carrying",0);
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
	if(GetPVarInt(playerid,"Carrying")==1) { SetPVarInt(playerid,"Carrying",0); }
	return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if(PRESSED(KEY_YES)) // ' Y ' Key
	{
	    if(GetPVarInt(playerid,"Carrying")==0) { SetPlayerSpecialAction(playerid, 25); SetPVarInt(playerid,"Carrying",1); }
	}
	else if(PRESSED(KEY_NO)) // ' N ' Key
	{
	    if(GetPVarInt(playerid,"Carrying")==1) { SetPlayerSpecialAction(playerid, 0); SetPVarInt(playerid,"Carrying",0); }
	}
	return 1;
}
Hope you understand.
Reply
#3

thanks.
Reply
#4

Edit: How can you add crates object or box when they're doing carry anims?
Reply
#5

Create an object, then attachobjecttoplayer.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)