RemoveBuildingForPlayer Function help -
SuperFiestaKreator - 07.08.2012
Im trying to add this map to a friend's SAMP server and cannot because I do not have knoledge of using the function RemoveBuildingForPlayer.
Thing is the default function is
Код:
public OnPlayerConnect(playerid)
{
// When the player connects model "615" which is veg_tree3 will be deleted within a range of 200.0
// from the point: 0.0, 0.0, 0.0, which is the center of San Andreas.
RemoveBuildingForPlayer(playerid, 615, 0.0, 0.0, 0.0, 200.0);
return 1;
}
That's the default code from the samp wikia, thing is when i goto his script he already has something filled up there...
Код:
public OnPlayerConnect(playerid)
{
LoggedTime[playerid] = 0;
new string[256];
gPlayerLogged[playerid] = 0;
gAdminLogged[playerid] = 0;
new plname[MAX_PLAYER_NAME],tmpvar;
GetPlayerName(playerid, plname, sizeof(plname));
if(!NameIsRP(plname))
{
SendClientMessage(playerid, COLOR_YELLOW2, "Immigration: Your name is not acceptable.");
SendClientMessage(playerid, COLOR_LIGHTRED, "Hint: your name must be in the format Firstname_Lastname.");
Kick(playerid); //yes, use Kick here because theres no data to save
return 1;
So like... I tried putting in another public OnPlayerConnect but gave me ton's of error's.
And this is the mapping code im trying to input
Код:
RemoveBuildingForPlayer(playerid, 5535, 1918.8516, -1776.3281, 16.9766, 0.25);
RemoveBuildingForPlayer(playerid, 5551, 2140.5156, -1735.1406, 15.8906, 0.25);
RemoveBuildingForPlayer(playerid, 5409, 1918.8516, -1776.3281, 16.9766, 0.25);
RemoveBuildingForPlayer(playerid, 1676, 1941.6563, -1778.4531, 14.1406, 0.25);
RemoveBuildingForPlayer(playerid, 1676, 1941.6563, -1774.3125, 14.1406, 0.25);
RemoveBuildingForPlayer(playerid, 1676, 1941.6563, -1771.3438, 14.1406, 0.25);
RemoveBuildingForPlayer(playerid, 1676, 1941.6563, -1767.2891, 14.1406, 0.25);
RemoveBuildingForPlayer(playerid, 5410, 2140.5156, -1735.1406, 15.8906, 0.25);
So Is there a idffrent way to do this or something? please help me im a noob at scripting
[EDIT]:I even tried deleteing the OnPlayerConnect he already had there but... Thing's didin't go well.
Re: RemoveBuildingForPlayer Function help -
StAsMaNn - 07.08.2012
Hm... look at my code.
public OnPlayerConnect(playerid) {
{
RemoveBuildingForPlayer(playerid, 2649, 477.8438, -7.7266, 1003.8672, 0.25);
RemoveBuildingForPlayer(playerid, 1436, 479.5938, -8.9922, 1001.2188, 0.25);
RemoveBuildingForPlayer(playerid, 1436, 479.5938, -4.2969, 1002.6328, 0.25);
RemoveBuildingForPlayer(playerid, 2653, 506.1406, -4.3672, 1004.2109, 0.25);
}
}
And this is working... Try to find in your gamemode - public OnPlayerConnect(playerid), after that write your code... A think you code will look like this...
public OnPlayerConnect(playerid) {
{
RemoveBuildingForPlayer(playerid, 5535, 1918.8516, -1776.3281, 16.9766, 0.25);
RemoveBuildingForPlayer(playerid, 5551, 2140.5156, -1735.1406, 15.8906, 0.25);
RemoveBuildingForPlayer(playerid, 5409, 1918.8516, -1776.3281, 16.9766, 0.25);
RemoveBuildingForPlayer(playerid, 1676, 1941.6563, -1778.4531, 14.1406, 0.25);
RemoveBuildingForPlayer(playerid, 1676, 1941.6563, -1774.3125, 14.1406, 0.25);
RemoveBuildingForPlayer(playerid, 1676, 1941.6563, -1771.3438, 14.1406, 0.25);
RemoveBuildingForPlayer(playerid, 1676, 1941.6563, -1767.2891, 14.1406, 0.25);
RemoveBuildingForPlayer(playerid, 5410, 2140.5156, -1735.1406, 15.8906, 0.25);
}
}
Re : RemoveBuildingForPlayer Function help -
ricardo178 - 07.08.2012
Just place that codes(RemoveBuildingForPlayer) under the OnPlayerConnect code, before the last braket.
Re: RemoveBuildingForPlayer Function help -
SuperFiestaKreator - 07.08.2012
can someone teamviewer me please?