Can someone script this for me?
#1

I give up 9 hours trying to add a simple piece of map code to a server.
I did everything correct. and had absolutely no error's. Even asked some people on forum's gave me same code but nothing.

Im trying to add this piece of map code as a filterscript

Код:
RemoveBuilding(5535, 1918.8516, -1776.3281, 16.9766, 0.25);
RemoveBuilding(5551, 2140.5156, -1735.1406, 15.8906, 0.25);
RemoveBuilding(1524, 1910.1641, -1779.6641, 18.7500, 0.25);
RemoveBuilding(5681, 1921.4844, -1778.9141, 18.5781, 0.25);
RemoveBuilding(5409, 1918.8516, -1776.3281, 16.9766, 0.25);
RemoveBuilding(1676, 1941.6563, -1778.4531, 14.1406, 0.25);
RemoveBuilding(1676, 1941.6563, -1774.3125, 14.1406, 0.25);
RemoveBuilding(955, 1928.7344, -1772.4453, 12.9453, 0.25);
RemoveBuilding(1676, 1941.6563, -1771.3438, 14.1406, 0.25);
RemoveBuilding(1676, 1941.6563, -1767.2891, 14.1406, 0.25);
RemoveBuilding(5410, 2140.5156, -1735.1406, 15.8906, 0.25);
CreateDynamicObject(5762, 1918.45, -1776.04, 15.62,   0.00, 0.00, 89.94);
CreateDynamicObject(1532, 1928.36, -1776.72, 12.47,   0.00, 0.00, 89.93);
CreateDynamicObject(12853, 2147.28, -1727.88, 14.42,   0.00, 0.00, 90.63);
CreateDynamicObject(17951, 2151.50, -1732.30, 13.99,   0.00, 0.00, 90.50);
CreateDynamicObject(2942, 2157.98, -1733.14, 13.18,   0.00, 0.00, 0.00);
CreateDynamicObject(1676, 2153.20, -1738.81, 14.06,   0.00, 0.00, 0.00);
CreateDynamicObject(1676, 2141.32, -1739.19, 14.06,   0.00, 0.00, 0.00);
or
Код:
RemoveBuildingForPlayer(playerid, 5535, 1918.8516, -1776.3281, 16.9766, 0.25);
RemoveBuildingForPlayer(playerid, 5551, 2140.5156, -1735.1406, 15.8906, 0.25);
RemoveBuildingForPlayer(playerid, 1524, 1910.1641, -1779.6641, 18.7500, 0.25);
RemoveBuildingForPlayer(playerid, 5681, 1921.4844, -1778.9141, 18.5781, 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, 955, 1928.7344, -1772.4453, 12.9453, 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);
CreateObject(5762, 1918.45, -1776.04, 15.62,   0.00, 0.00, 89.94);
CreateObject(1532, 1928.36, -1776.72, 12.47,   0.00, 0.00, 89.93);
CreateObject(12853, 2147.28, -1727.88, 14.42,   0.00, 0.00, 90.63);
CreateObject(17951, 2151.50, -1732.30, 13.99,   0.00, 0.00, 90.50);
CreateObject(2942, 2157.98, -1733.14, 13.18,   0.00, 0.00, 0.00);
CreateObject(1676, 2153.20, -1738.81, 14.06,   0.00, 0.00, 0.00);
CreateObject(1676, 2141.32, -1739.19, 14.06,   0.00, 0.00, 0.00);
There both the same map just in diffrent type of code. 9 hour's tried everything did everything correct even people gave me the code and said that was the correct code and nothing. Im tired all i have left is for someone to code it for me. And before you give me the script please test it out if you can
This is what im trying to add http://forum.sa-mp.com/showthread.ph...82#post1719282
oh btw im trying to map this as a filterscript not with a gamemode
Reply
#2

pawn Код:
#include <a_samp>

main();

OnFilterScriptInit()
{
    CreateObject(5762, 1918.45, -1776.04, 15.62,   0.00, 0.00, 89.94);
    CreateObject(1532, 1928.36, -1776.72, 12.47,   0.00, 0.00, 89.93);
    CreateObject(12853, 2147.28, -1727.88, 14.42,   0.00, 0.00, 90.63);
    CreateObject(17951, 2151.50, -1732.30, 13.99,   0.00, 0.00, 90.50);
    CreateObject(2942, 2157.98, -1733.14, 13.18,   0.00, 0.00, 0.00);
    CreateObject(1676, 2153.20, -1738.81, 14.06,   0.00, 0.00, 0.00);
    CreateObject(1676, 2141.32, -1739.19, 14.06,   0.00, 0.00, 0.00);
}

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, 1524, 1910.1641, -1779.6641, 18.7500, 0.25);
    RemoveBuildingForPlayer(playerid, 5681, 1921.4844, -1778.9141, 18.5781, 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, 955, 1928.7344, -1772.4453, 12.9453, 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);
}
This filterscript is not tested nor compiled but should work.
Reply
#3

Quote:
Originally Posted by AustinJ
Посмотреть сообщение
pawn Код:
#include <a_samp>

main();

OnFilterScriptInit()
{
    CreateObject(5762, 1918.45, -1776.04, 15.62,   0.00, 0.00, 89.94);
    CreateObject(1532, 1928.36, -1776.72, 12.47,   0.00, 0.00, 89.93);
    CreateObject(12853, 2147.28, -1727.88, 14.42,   0.00, 0.00, 90.63);
    CreateObject(17951, 2151.50, -1732.30, 13.99,   0.00, 0.00, 90.50);
    CreateObject(2942, 2157.98, -1733.14, 13.18,   0.00, 0.00, 0.00);
    CreateObject(1676, 2153.20, -1738.81, 14.06,   0.00, 0.00, 0.00);
    CreateObject(1676, 2141.32, -1739.19, 14.06,   0.00, 0.00, 0.00);
}

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, 1524, 1910.1641, -1779.6641, 18.7500, 0.25);
    RemoveBuildingForPlayer(playerid, 5681, 1921.4844, -1778.9141, 18.5781, 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, 955, 1928.7344, -1772.4453, 12.9453, 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);
}
This filterscript is not tested nor compiled but should work.
It kinda' worked it only removed the building but did not create any object's.
Reply
#4

RemoveBuilding isn't suppose to create objects. It deletes default game objects.

"This forum requires that you wait 120 seconds between posts. Please try again in 44 seconds."
Reply
#5

Do as Austin said, but he's doing something wrong, He's creaing first the objects then removing the buildings, try doing it backwards, Remove the buildings first OnFilterscriptIni callback and then Create the object OnPlayerConnect
Reply
#6

You can not remove objects in OnFilterscriptInit and you wouldn't want to create objects in OnPlayerConnect since that would create multiple of the same objects. Also the remove objects should interfere with the existing Objects since the radius at which RemoveBuilding deletes is very small so it only the deletes the object it is meant to.
Reply
#7

pawn Код:
#include <a_samp>

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
   
    CreateDynamicObject(5762, 1918.45, -1776.04, 15.62,   0.00, 0.00, 89.94);
    CreateDynamicObject(1532, 1928.36, -1776.72, 12.47,   0.00, 0.00, 89.93);
    CreateDynamicObject(12853, 2147.28, -1727.88, 14.42,   0.00, 0.00, 90.63);
    CreateDynamicObject(17951, 2151.50, -1732.30, 13.99,   0.00, 0.00, 90.50);
    CreateDynamicObject(2942, 2157.98, -1733.14, 13.18,   0.00, 0.00, 0.00);
    CreateDynamicObject(1676, 2153.20, -1738.81, 14.06,   0.00, 0.00, 0.00);
    CreateDynamicObject(1676, 2141.32, -1739.19, 14.06,   0.00, 0.00, 0.00);
   
     //or try this;
  /*CreateObject(5762, 1918.45, -1776.04, 15.62,   0.00, 0.00, 89.94);
    CreateObject(1532, 1928.36, -1776.72, 12.47,   0.00, 0.00, 89.93);
    CreateObject(12853, 2147.28, -1727.88, 14.42,   0.00, 0.00, 90.63);
    CreateObject(17951, 2151.50, -1732.30, 13.99,   0.00, 0.00, 90.50);
    CreateObject(2942, 2157.98, -1733.14, 13.18,   0.00, 0.00, 0.00);
    CreateObject(1676, 2153.20, -1738.81, 14.06,   0.00, 0.00, 0.00);
    CreateObject(1676, 2141.32, -1739.19, 14.06,   0.00, 0.00, 0.00);*/

    return 1;
}

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, 1524, 1910.1641, -1779.6641, 18.7500, 0.25);
    RemoveBuildingForPlayer(playerid, 5681, 1921.4844, -1778.9141, 18.5781, 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, 955, 1928.7344, -1772.4453, 12.9453, 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);
    return 1;
}
Reply
#8

Quote:
Originally Posted by Devilxz97
Посмотреть сообщение
pawn Код:
#include <a_samp>

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
   
    CreateDynamicObject(5762, 1918.45, -1776.04, 15.62,   0.00, 0.00, 89.94);
    CreateDynamicObject(1532, 1928.36, -1776.72, 12.47,   0.00, 0.00, 89.93);
    CreateDynamicObject(12853, 2147.28, -1727.88, 14.42,   0.00, 0.00, 90.63);
    CreateDynamicObject(17951, 2151.50, -1732.30, 13.99,   0.00, 0.00, 90.50);
    CreateDynamicObject(2942, 2157.98, -1733.14, 13.18,   0.00, 0.00, 0.00);
    CreateDynamicObject(1676, 2153.20, -1738.81, 14.06,   0.00, 0.00, 0.00);
    CreateDynamicObject(1676, 2141.32, -1739.19, 14.06,   0.00, 0.00, 0.00);
   
     //or try this;
  /*CreateObject(5762, 1918.45, -1776.04, 15.62,   0.00, 0.00, 89.94);
    CreateObject(1532, 1928.36, -1776.72, 12.47,   0.00, 0.00, 89.93);
    CreateObject(12853, 2147.28, -1727.88, 14.42,   0.00, 0.00, 90.63);
    CreateObject(17951, 2151.50, -1732.30, 13.99,   0.00, 0.00, 90.50);
    CreateObject(2942, 2157.98, -1733.14, 13.18,   0.00, 0.00, 0.00);
    CreateObject(1676, 2153.20, -1738.81, 14.06,   0.00, 0.00, 0.00);
    CreateObject(1676, 2141.32, -1739.19, 14.06,   0.00, 0.00, 0.00);*/

    return 1;
}

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, 1524, 1910.1641, -1779.6641, 18.7500, 0.25);
    RemoveBuildingForPlayer(playerid, 5681, 1921.4844, -1778.9141, 18.5781, 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, 955, 1928.7344, -1772.4453, 12.9453, 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);
    return 1;
}
I get a warning saying expression has no effect... On all the line's my RemoveBuildingForPlayer is on.
Reply
#9

Quote:
Originally Posted by Mr.Kfresh
Посмотреть сообщение
Uhmm, just copy that stuff go to convertffs.com to change to a filterscript, change the settings to whatever, press convert now and you got it in a FS or a gamemode or anything.
Omg, don't give such super noob answers. lol
The settings are different depening on the streamer he uses, and converter only gives the map code.


Post RemoveBuildingForPlayer under OnPlayerConnect and the objects under OnFilterScriptInit. As you are using streamer, make sure to have it included on the top of your script.

Also, be sure you enabled the FS...
Reply
#10

This will work for sure but remember to add it in filterscripts line in server.cfg...

pawn Код:
#include <a_samp>

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    CreateObject(5762, 1918.45, -1776.04, 15.62,   0.00, 0.00, 89.94);
    CreateObject(1532, 1928.36, -1776.72, 12.47,   0.00, 0.00, 89.93);
    CreateObject(12853, 2147.28, -1727.88, 14.42,   0.00, 0.00, 90.63);
    CreateObject(17951, 2151.50, -1732.30, 13.99,   0.00, 0.00, 90.50);
    CreateObject(2942, 2157.98, -1733.14, 13.18,   0.00, 0.00, 0.00);
    CreateObject(1676, 2153.20, -1738.81, 14.06,   0.00, 0.00, 0.00);
    CreateObject(1676, 2141.32, -1739.19, 14.06,   0.00, 0.00, 0.00);
    return 1;
}

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, 1524, 1910.1641, -1779.6641, 18.7500, 0.25);
    RemoveBuildingForPlayer(playerid, 5681, 1921.4844, -1778.9141, 18.5781, 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, 955, 1928.7344, -1772.4453, 12.9453, 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);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)