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



RemoveBuildingForPlayer - coolmark1995 - 14.04.2013

Hello I have been trying to make a filterscript with
Код:
RemoveBuildingForPlayer(playerid, 762, 1023.5938, -2050.6875, 16.0859, 0.25);
RemoveBuildingForPlayer(playerid, 762, 1011.8594, -2043.5000, 16.0859, 0.25);
but I was wondering can this be done or must it be in a game mode? and if it can be done how could I add it to a filterscript I tried on player connect but I dont think thats right how could I go about this?


Re: RemoveBuildingForPlayer - JaKe Elite - 14.04.2013

No. It was suppose to be place in OnPlayerConnect.
OnGameModeInit/OnFilterScriptInit has no parameters. That's why RemoveBuildingForPlayer
isn't suitable for that callback. OnPlayerConnect has playerid callback so it was suitable for it.

The function can be only used in a callback that has playerid parameters.


Re: RemoveBuildingForPlayer - coolmark1995 - 14.04.2013

well how can I add this to ppc_trucking game mode?


Re: RemoveBuildingForPlayer - JaKe Elite - 14.04.2013

add it OnPlayerConnect.
It was that easy. So what's the problem?

You're asking if it can be putted OnGameModeInit. my answer is no.