Setting object question - 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: Setting object question (
/showthread.php?tid=393289)
Setting object question -
jakejohnsonusa - 17.11.2012
Ok so I have a boombox command that will place a boombox. When placing it I want it to be at the same level as the players FEET (on the ground)... How should I write this. This is what I have now (which sets it on the player at head level).
pawn Код:
if(strcmp(tmp,"on",true) == 0)
{
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
new Float:mX, Float:mY, Float:mZ;
GetPlayerPos(playerid, mX, mY, mZ);
playerBoombox[playerid] = CreateObject(2103, mX, mY, mZ, -1.5, 0.0, 0.0, 0.0);
ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Los Santos Radio","Top Teen Radio\nTop Radio\nClassic Hits Radio\nRock Radio\nTop Teen Radio (ALL)\nTop Radio (ALL)\nChristmas Songs\nChristmas Songs (ALL)","Select","Cancel");
}
Re: Setting object question -
ReneG - 17.11.2012
Read your code
pawn Код:
playerBoombox[playerid] = CreateObject(2103, mX, mY, mZ - 1.5, 0.0, 0.0, 0.0, 0.0);
Re: Setting object question -
jakejohnsonusa - 17.11.2012
I did. Whats wrong with it.
Please note that I am a very beginer scripter.
Re: Setting object question -
jakejohnsonusa - 17.11.2012
Anyone know what I did wrong?