Object not being placed on my position x,y,z
#1

For some reason, when I use the command, it's not placing the object at all. It's returning the message "You have planted a marijuana bush etc.." but that's all. It's not creating the object I want it to create.

pawn Code:
new string[128], Float:x, Float:y, Float:z;
            GetPlayerPos(playerid, x,y,z);
            CreateObject(playerid, 823, x, y, z+2, 0, 0, 0);
            format(string, sizeof(string), "%s kneels down and plants some weed seeds.", GetICName(playerid));
            SendNearByMessage(playerid, ACTION_COLOR, string, 6);
            SendClientMessage(playerid, GREEN, "You have planted a marijuana bush, please come back later to harvest it!");
            SendClientMessage(playerid, GREEN, "Be careful other players do not take your weed, so keep a close eye on it!");
            PlayerStat[playerid][HasWeedSeeds] -= 1;
Any help would be appreciated, thank you
Reply
#2

Code:
CreateObject(playerid, 823, x, y, z+2, 0, 0, 0);
?

Code:
CreateObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance)
Shouldn't this return an error?
remove "playerid"
Reply
#3

Quote:
Originally Posted by Sawalha
View Post
Code:
CreateObject(playerid, 823, x, y, z+2, 0, 0, 0);
?

Code:
CreateObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance)
Shouldn't this return an error?
remove "playerid"
Thanks! I fixed it but the object still isn't being placed
Reply
#4

So if this is your new code
pawn Code:
GetPlayerPos(playerid, x,y,z);
CreateObject( 823, x, y, z+2, 0, 0, 0);
then it should work unless you didn't reached 1000 objects on server without streamer
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)