SA-MP Forums Archive
Bugreport: RemoveBuildingForPlayer does not work - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP (https://sampforum.blast.hk/forumdisplay.php?fid=3)
+--- Forum: Bug Reports (https://sampforum.blast.hk/forumdisplay.php?fid=20)
+--- Thread: Bugreport: RemoveBuildingForPlayer does not work (/showthread.php?tid=559774)



Bugreport: RemoveBuildingForPlayer does not work - Mr_Brox - 25.01.2015

Hi,

after I updated my test server on version 0.3.7 RC 1, the function "RemoveBuildingForPlayer" has no effect. The objects are still displayed.

// Edit: Sorry, wrong category. It would be nice if someone can move this thread to "Bugreports".

Best Regards

Mr_Brox


Re: Bugreport: RemoveObjectForPlayer does not work - T-N-Z - 25.01.2015

I had troubles with CreateObjectForPlayer aswell, I had to reload stunt_island everytime because when someone else connected they couldn't see island objects, same with zombotech, the original building won't get removed unless I reload the filterscript.


Re: Bugreport: RemoveBuildingForPlayer does not work - Mr_Brox - 25.01.2015

OK, I found the problem. It is not possible to use "RemoveBuildingForPlayer" in OnPlayerConnect. That is why the filterscript is working.


Re: Bugreport: RemoveBuildingForPlayer does not work - Patrik356b - 25.01.2015

Quote:
Originally Posted by Mr_Brox
Посмотреть сообщение
OK, I found the problem. It is not possible to use "RemoveBuildingForPlayer" in OnPlayerConnect. That is why the filterscript is working.
I have seen this a few times but not often.


Re: Bugreport: RemoveBuildingForPlayer does not work - Pottus - 25.01.2015

It's likely you have a return 0 somewhere in a OnPlayerConnect() callback the culprit is probably fsdebug if you have it loaded.


Re: Bugreport: RemoveBuildingForPlayer does not work - Mr_Brox - 25.01.2015

No, I have only "return 1;" in OnPlayerConnect.


Re: Bugreport: RemoveBuildingForPlayer does not work - Pottus - 25.01.2015

Check ALL filterscripts if you have fsdebug loaded it has return 0; in the code for some reason.


Re: Bugreport: RemoveBuildingForPlayer does not work - Mr_Brox - 25.01.2015

I don't use any filterscripts. Only my includes and my self written script.


Re: Bugreport: RemoveBuildingForPlayer does not work - ikkentim - 25.01.2015

Try and use SendClientMessage right before you call RemoveBuildingForPlayer. This way you know if the code is actually executed.


Re: Bugreport: RemoveBuildingForPlayer does not work - Mr_Brox - 25.01.2015

It worked with 0.3z R4 but not with 0.3.7 RC 1. But I don't care. I've already solved it. I placed the RemoveBuildingForPlayer code in OnPlayerRequestClass.