Simple CreateObject Question - DustinJay - 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: Simple CreateObject Question - DustinJay (
/showthread.php?tid=412450)
Simple CreateObject Question - DustinJay -
iGotcha - 02.02.2013
Hello, i'm working on a small, simple and quick filter script. It's a drug system that will spawn obects at the feet of the command sending player.
Example:
Player: /plantlist
Server: Select a seed from the list below.
Sever: 1. Pot
Server: 2. Opium
Player: /plantlist 2
Now the selected object / seed will spawn a object right on the players cord's but -0.5 on the Z.
What i have:
Код:
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
CreateObject(742, x, y, z, 0, 0, 0, 10.0);
What i thought would work / might explain what i want to do:
Код:
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
CreateObject(742, x, y, z-0.5, 0, 0, 0, 10.0);
NOTICE: CreateObject(742, x, y, z-0.5, 0, 0, 0, 10.0)
Finally, i have everything i need in working condition, i just don't know how to simply make the "CreateObject" spawn it a little bit lower then the exact player position.
Re: Simple CreateObject Question - DustinJay -
Cameryn - 02.02.2013
Try increasing the value you are subtracting from the "Z" axis? I'm not exactly sure why it wouldn't work.
Re: Simple CreateObject Question - DustinJay -
mastermax7777 - 02.02.2013
wtf is ur question? lower? then just decrease Z value.. problem?
Re: Simple CreateObject Question - DustinJay -
Travis The Tiger - 02.02.2013
Yeah, just increase the negative value of the Z to like -0.7 or -1. Not really that difficult.