Building Removing Pawno
#1

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);
Reply
#2

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);
Reply
#3

Thank you.

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

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.
Reply
#5

Linhas?
Reply
#6

True wrong section, my bad.

Thank you for helping.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)