Using operators?
#1

Hello , i've been trying to create an object and place it on the ground.
But since I use the player position it spawns in the middle of my ped.
I've tried to us an operator thing but I dont know how to use it.

I made an account specially for this since I diddnt find it on ******.
Sorry if I should have looked better.
Here is my current script.

Код:
	if(!strcmp(cmdtext, "/cbr"))
	{
		new Float:x, Float:y, Float:z;
		GetPlayerPos(playerid, x, y, z);
        CreateObject(1425, x, y, z,   0.00, 0.00, 0.00);
        y -= 10;
       	SendClientMessage(playerid, COLOR_LIGHTRED, "Object created.");
	}
Thank you for reading this.
Reply
#2

pawn Код:
if(!strcmp(cmdtext, "/cbr",false))
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    CreateObject(1425, x, y-10.0, z,   0.00, 0.00, 0.00);
    SendClientMessage(playerid, COLOR_LIGHTRED, "Object created.");
}
Try this
Reply
#3

The only ways to adjust/set a position of an existent object is when creating it, using SetObjectPos function or MoveObject function, however, the coordinates is to be changed/set within one of those functions just like the example above.
Reply
#4

God I feel retarted now.
Well atleast you helped me!
Thank you very mush!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)