Removeobjectforplayer not working?
#1

Hey there!

I picked up mapping again and decided to map some sort of a fire station. To do that I had to remove a couple of objects, the sandpit and crane at market hospital to be precise. I used the map editor that is on this forum to produce the code and for some reason it does not show up ingame.

The code that I use:
Код:
public OnPlayerConnect(playerid)
{	
RemoveBuildingForPlayer(playerid, 5967, 1259.4375, -1246.8125, 17.1094, 0.25);
RemoveBuildingForPlayer(playerid, 1388, 1238.3750, -1258.2813, 57.2031, 0.25);
RemoveBuildingForPlayer(playerid, 1391, 1238.3750, -1258.2734, 44.6641, 0.25);
RemoveBuildingForPlayer(playerid, 5857, 1259.4375, -1246.8125, 17.1094, 0.25);
RemoveBuildingForPlayer(playerid, 1219, 1284.1797, -1239.6406, 12.9141, 0.25);
RemoveBuildingForPlayer(playerid, 4057, 1479.5547, -1693.1406, 19.5781, 0.25);
RemoveBuildingForPlayer(playerid, 4226, 1359.2813, -1796.4688, 24.3438, 0.25);
RemoveBuildingForPlayer(playerid, 4023, 1359.2813, -1796.4688, 24.3438, 0.25);
RemoveBuildingForPlayer(playerid, 4186, 1479.5547, -1693.1406, 19.5781, 0.25);

	return 1;
}
Does any of you perhaps have a idea why the objects are not disapearing? I run gamemode bare which is also set in the server.cfg
Reply
#2

To add:
A experienced friend just scripter a teleport command for me to tp to the area that is supposed to be removed, however that does not work either. It is like the server does not recognize any gamemode changes.
Reply
#3

Is it all objects aren't removing or just the crane in particular?

And have you tried upping the radius for the removal?
Reply
#4

Stupid question but have you compiled the script? Just editing the .pwn file is not enough.
Reply
#5

Quote:
Originally Posted by Vince
Посмотреть сообщение
Stupid question but have you compiled the script? Just editing the .pwn file is not enough.
Not indeed. It's a good question.

_____
Press F5 to compile and copy your .amx to your gamemodes folder located in your directory and run the server executable.
If still not helpful, you must be doing it wrong or may need to increase the radius of the RemoveObjForPlayer.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)