SA-MP Forums Archive
Someone can pick this X,Y,Z attobejct pls? - 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: Someone can pick this X,Y,Z attobejct pls? (/showthread.php?tid=595257)



Someone can pick this X,Y,Z attobejct pls? - pedrotvr - 30.11.2015

I tryed use FS, but I could not make it right
Someone PLEASE can take this X,Y,Z for me?



Код:
CMD:box(playerid) { // Next time, use map editor to get coordinates. 
	SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
	AttachObjectToPlayer(box1, playerid, 1.5, 0.5, 0.0, 0.0, 1.5, 2);
	return 1;
}



Re: Someone can pick this X,Y,Z attobejct pls? - Denying - 30.11.2015

Just mess around with the values.


Re: Someone can pick this X,Y,Z attobejct pls? - Threshold - 30.11.2015

Well the object will be in line with the player's body... so X and Y offset should be 0. Then you just need to mess around with the Z offset.

I'd also recommend you take a look at SetPlayerAttachedObject.


Re: Someone can pick this X,Y,Z attobejct pls? - Sew_Sumi - 30.11.2015

Did anyone make that ingame object editor easy to use, or is everyone holding that close to their chests or something?

Actually, isn't it an FS in the standard SA-MP package?


Re: Someone can pick this X,Y,Z attobejct pls? - J0sh... - 30.11.2015

You could do this:

PHP код:
public OnPlayerEditObject(playeridplayerobjectobjectidresponseFloat:fXFloat:fYFloat:fZFloat:fRotXFloat:fRotYFloat:fRotZ)
{
    new 
tmp[128];
    
format(tmp128"Pos of object: %f, %f, %f | ROT: %f,%f,%f" fXfYfZfRotXfRotYfRotZ);
    
SendClientMessage(playerid, -1tmp);
    return 
1;
}
CMD:box(playerid) { // Next time, use map editor to get coordinates. 
    
SetPlayerSpecialAction(playeridSPECIAL_ACTION_CARRY);
    
AttachObjectToPlayer(box1playerid1.50.50.00.01.52);
    
EditObject(playeridbox1);
        return 
1;




Re: Someone can pick this X,Y,Z attobejct pls? - pedrotvr - 01.12.2015

Quote:
Originally Posted by Jamester
Посмотреть сообщение
You could do this:

PHP код:
public OnPlayerEditObject(playeridplayerobjectobjectidresponseFloat:fXFloat:fYFloat:fZFloat:fRotXFloat:fRotYFloat:fRotZ)
{
    new 
tmp[128];
    
format(tmp128"Pos of object: %f, %f, %f | ROT: %f,%f,%f" fXfYfZfRotXfRotYfRotZ);
    
SendClientMessage(playerid, -1tmp);
    return 
1;
}
CMD:box(playerid) { // Next time, use map editor to get coordinates. 
    
SetPlayerSpecialAction(playeridSPECIAL_ACTION_CARRY);
    
AttachObjectToPlayer(box1playerid1.50.50.00.01.52);
    
EditObject(playeridbox1);
        return 
1;

I was fixed, but ty bro +rep