Objects on GX
#1

[ame]http://www.youtube.com/watch?v=JBSFARlwHhE&feature=related[/ame]

Heyho.

What the hell?
How to made awesome stuff like this? D

Greetz
Reply
#2

Called coding.
Reply
#3

This uses the 0.3c pre-release, so you will need to have that installed to do this (link is here if you don't have it: https://sampforum.blast.hk/showthread.php?tid=194031).

The major function that is used here is SetPlayerAttachedObject, you can find information on how to use it on the wiki here: https://sampwiki.blast.hk/wiki/SetPlayerAttachedObject Be sure to check out the related functions too.
Reply
#4

you might use a simple /hold command, which is fun to experiment with. no doubt ^^
Код:
CMD:hold(playerid,params[]){
	new TargetID,optional[64],Index,optional2[64],Bone,ObjectID,optional3[64],Float:OffsetX,Float:OffsetY,Float:OffsetZ,Float:RotX,Float:RotY,Float:RotZ,Float:ScaleX,Float:ScaleY,Float:ScaleZ;
	if(sscanf(params,"uz",TargetID,optional))
	{
		SendClientMessage(playerid,MSGCMDS_COLOR, "Usage: \"/Hold <PlayerID/Name> [Index (0-4)] [<Bone (1-18)> <ObjectID>] [OffsetX,Y,Z] [RotX,Y,Z] [ScaleX,Y,Z]\"");
		return 1;
	}
	if(TargetID!=INVALID_PLAYER_ID)
	{
		if(sscanf(optional,"dz",Index,optional2))
		{
			SendClientMessage(playerid,MSGSUCC_COLOR, "No Index > All Objects removed.");
			RemovePlayerAttachedObject(TargetID,0);
			RemovePlayerAttachedObject(TargetID,1);
			RemovePlayerAttachedObject(TargetID,2);
			RemovePlayerAttachedObject(TargetID,3);
			RemovePlayerAttachedObject(TargetID,4);
			return 1;
		}
		if(Index >-1 && Index<6)
		{
			if(sscanf(optional2,"ddz",Bone,ObjectID,optional3))
			{
				SendClientMessage(playerid,MSGSUCC_COLOR, "Index > Object removed.");
				RemovePlayerAttachedObject(TargetID,Index);
				return 1;
			}
			if(Bone >0 && Bone<19)
			{
				if(sscanf(optional3,"fffffffff",OffsetX,OffsetY,OffsetZ,RotX,RotY,RotZ,ScaleX,ScaleY,ScaleZ))
				{
					SendClientMessage(playerid,MSGDBUG_COLOR, "No Off,Rot,Sca");
					ScaleX=1;
					ScaleY=1;
					ScaleZ=1;
				}
				SetPlayerAttachedObject(TargetID,Index,ObjectID,Bone,OffsetZ,OffsetY,OffsetX,RotZ,RotY,RotX,ScaleX,ScaleY,ScaleZ);
			}
		}
	}
	return 1;
}
using ZCMD & sscanf, take whatever you need. theres a lot to enhance i guess
Reply
#5

I am thinkin' about making a huge ass dildo for my rp server xD
Reply
#6

/hold <yourname/id> 0 17 321 -.175 .8 .3 0 140 90 5 5 10
/hold <yourname/id> 1 17 18705 -3.2 3.9 3.6 -60 00 0 2 4 2
test it on a bike ^^
@ propilot: http://www.xfire.com/video/3d1d69/
like this? lolol
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)