SetPlayerHoldingObject positions etc.
#1

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!
Reply
#2

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

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

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

Yes and its placed in this position "/"
Reply
#6

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

you know in this rotation like "slash"
Reply
#8

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

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

Try the rotation and offset parmeters.
Reply
#10

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;
}
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)