SA-MP Forums Archive
Building Removing Pawno - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Building Removing Pawno (/showthread.php?tid=560665)



Building Removing Pawno - MasonPlay - 29.01.2015

I had this code under OnGameModeUnit togheter with the map codes, but when i compile it gives me 26 errors, without Remove building it gives me 2 warnings.
The warnings are all about Playerid

: warning 217: loose indentation
: error 017: undefined symbol "playerid"

+rep!!

//Remove Buildings///////////////////////////////////////////////////////////////////////////////////////////////
RemoveBuildingForPlayer(playerid, 4969, 1932.429, -2123.406, 15.945, 0.250);
RemoveBuildingForPlayer(playerid, 1531, 1936.882, -2134.906, 14.218, 0.250);
RemoveBuildingForPlayer(playerid, 1412, 1921.015, -2153.351, 13.726, 0.250);
RemoveBuildingForPlayer(playerid, 1413, 1921.015, -2148.070, 13.726, 0.250);
RemoveBuildingForPlayer(playerid, 4984, 1880.710, -2112.632, 21.257, 0.250);
RemoveBuildingForPlayer(playerid, 5087, 1880.710, -2112.632, 21.257, 0.250);
RemoveBuildingForPlayer(playerid, 1413, 1921.015, -2137.507, 13.726, 0.250);
RemoveBuildingForPlayer(playerid, 1412, 1921.015, -2142.789, 13.726, 0.250);
RemoveBuildingForPlayer(playerid, 1413, 1921.015, -2121.250, 13.726, 0.250);
RemoveBuildingForPlayer(playerid, 1412, 1921.015, -2126.531, 13.726, 0.250);
RemoveBuildingForPlayer(playerid, 1372, 1920.054, -2122.414, 12.687, 0.250);
RemoveBuildingForPlayer(playerid, 1412, 1921.015, -2115.976, 13.726, 0.250);
RemoveBuildingForPlayer(playerid, 1413, 1921.015, -2110.695, 13.726, 0.250);
RemoveBuildingForPlayer(playerid, 5017, 1932.429, -2123.406, 15.945, 0.250);
RemoveBuildingForPlayer(playerid, 1532, 1939.601, -2116.757, 12.679, 0.250);
RemoveBuildingForPlayer(playerid, 1226, 1944.804, -2136.257, 15.851, 0.250);
RemoveBuildingForPlayer(playerid, 1226, 1944.804, -2110.296, 15.851, 0.250);


Re: Building Removing Pawno - zqkRazer - 29.01.2015

Coloque na public onplayerconnect

public OnPlayerConnect(playerid)
{
//Remove Buildings///////////////////////////////////////////////////////////////////////////////////////////////
RemoveBuildingForPlayer(playerid, 4969, 1932.429, -2123.406, 15.945, 0.250);
RemoveBuildingForPlayer(playerid, 1531, 1936.882, -2134.906, 14.218, 0.250);
RemoveBuildingForPlayer(playerid, 1412, 1921.015, -2153.351, 13.726, 0.250);
RemoveBuildingForPlayer(playerid, 1413, 1921.015, -2148.070, 13.726, 0.250);
RemoveBuildingForPlayer(playerid, 4984, 1880.710, -2112.632, 21.257, 0.250);
RemoveBuildingForPlayer(playerid, 5087, 1880.710, -2112.632, 21.257, 0.250);
RemoveBuildingForPlayer(playerid, 1413, 1921.015, -2137.507, 13.726, 0.250);
RemoveBuildingForPlayer(playerid, 1412, 1921.015, -2142.789, 13.726, 0.250);
RemoveBuildingForPlayer(playerid, 1413, 1921.015, -2121.250, 13.726, 0.250);
RemoveBuildingForPlayer(playerid, 1412, 1921.015, -2126.531, 13.726, 0.250);
RemoveBuildingForPlayer(playerid, 1372, 1920.054, -2122.414, 12.687, 0.250);
RemoveBuildingForPlayer(playerid, 1412, 1921.015, -2115.976, 13.726, 0.250);
RemoveBuildingForPlayer(playerid, 1413, 1921.015, -2110.695, 13.726, 0.250);
RemoveBuildingForPlayer(playerid, 5017, 1932.429, -2123.406, 15.945, 0.250);
RemoveBuildingForPlayer(playerid, 1532, 1939.601, -2116.757, 12.679, 0.250);
RemoveBuildingForPlayer(playerid, 1226, 1944.804, -2136.257, 15.851, 0.250);
RemoveBuildingForPlayer(playerid, 1226, 1944.804, -2110.296, 15.851, 0.250);


Re: Building Removing Pawno - MasonPlay - 29.01.2015

Thank you.

I got 4 warnings now.. ?
warning 217: loose indentation


Re: Building Removing Pawno - DamonD - 29.01.2015

This is in the wrong section. Anyway,

OnGameModeInit is called when the gamemode initiates. You'd want to remove buildings under OnPlayerConnect, which is called when a player connects to the server.


Re: Building Removing Pawno - zqkRazer - 29.01.2015

Linhas?


Re: Building Removing Pawno - MasonPlay - 29.01.2015

True wrong section, my bad.

Thank you for helping.