SA-MP Forums Archive
help - 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: help (/showthread.php?tid=598360)



help - GeneralAref - 11.01.2016

i have problem with auto door.when door open i see this:

and i check OnGameModeInit and remove old fence but not works.Who can help me?
OnGameModeInit:
Код:
areagate1 = CreateObject(19313, 134.7061, 1941.5814, 21.6600, 0.0000, 0.0000, 0.0000);
areagate2 = CreateObject(19313, 286.05475, 1819.83301, 19.96110,   0.00000, 0.00000, 90.00000);
areagate3 = CreateObject(2928, 226.32570, 1872.37012, 13.59680,   0.00000, 0.00000, 90.00000);
OnPlayerConnect:
Код:
RemoveBuildingForPlayer(playerid, 16094, 191.1406, 1870.0391, 21.4766, 0.25);



Re: help - saffierr - 11.01.2016

PHP код:
RemoveBuildingForPlayer 
Add it in OnPlayerSpawn


Re: help - lucamsx - 11.01.2016

Quote:
Originally Posted by saffierr
Посмотреть сообщение
PHP код:
RemoveBuildingForPlayer 
Add it in OnPlayerSpawn
Don't do that.
from samp wiki:
Quote:

When removing the same object for a player, they will crash. Commonly, players crash when reconnecting to the server because the server removes buildings on OnPlayerConnect.

If you want to put this in OnPlayerSpawn, create some player variable so this function will be executed only once, not every time player is spawning


Re: help - Karan007 - 11.01.2016

Quote:
Originally Posted by saffierr
Посмотреть сообщение
PHP код:
RemoveBuildingForPlayer 
Add it in OnPlayerSpawn
Wrong, it should be added OnOplayerConnect.


Re: help - saffierr - 11.01.2016

Ooh, sorry mybad