SA-MP Forums Archive
SetPlayerHoldingObject positions etc. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: SetPlayerHoldingObject positions etc. (/showthread.php?tid=179148)



SetPlayerHoldingObject positions etc. - sekol - 25.09.2010

I can't find right coords/offsets (i don't know ) to make a object "hat" look like player is really wearing it. Help plz. It can be any hat!


Re: SetPlayerHoldingObject positions etc. - Mike_Peterson - 25.09.2010

errm try using bone 2 its head and additional z offset maybe


Re: SetPlayerHoldingObject positions etc. - sekol - 25.09.2010

Yeah but i can't get right Z offset... Defaultly it's weird looking


Re: SetPlayerHoldingObject positions etc. - Mike_Peterson - 25.09.2010

hmm, did u try just bone 2? like
SetPlayerHoldingObject(playerid, (modelid), 2);


Re: SetPlayerHoldingObject positions etc. - sekol - 25.09.2010

Yes and its placed in this position "/"


Re: SetPlayerHoldingObject positions etc. - Mike_Peterson - 25.09.2010

Quote:
Originally Posted by sekol
Посмотреть сообщение
Yes and its placed in this position "/"
err? lol what u mean


Re: SetPlayerHoldingObject positions etc. - sekol - 25.09.2010

you know in this rotation like "slash"


Re: SetPlayerHoldingObject positions etc. - Mike_Peterson - 25.09.2010

yea thats good, a hat supposed to be slashed :P just kidding
try using the rotation parameters


Re: SetPlayerHoldingObject positions etc. - Memoryz - 25.09.2010

https://sampwiki.blast.hk/wiki/SetPlayerHoldingObject

Try the rotation and offset parmeters.


Re: SetPlayerHoldingObject positions etc. - Babul - 25.09.2010

use whatever you need:
Код:
CMD:hatglow(playerid,params[]){//				admin
	if(!IsPlayerAdmin(playerid))
	{
		SendClientMessage(playerid,MSGFAIL_COLOR,"Command not available.");
		return 1;
	}
	{
		new TargetID;
		if (sscanf(params,"u",TargetID))
		{
			SendClientMessage(playerid,MSGCMDS_COLOR, "Usage: \"/HatGlow <PlayerID/Name>\"");
		}
		else
		{
			if(TargetID!=INVALID_PLAYER_ID)
			{
				SetPlayerHoldingObject(TargetID,1213,2,0,0,0,0,90,0);// the 0 90 0 are the rotation parameters. the 90 is the important part you need i guess
			}
		}
	}
	return 1;
}