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



FS problems :( - Mr.Black - 27.02.2011

Okay , after i am done with MTA and conveted the codes to Pawno , and i want to make them Filter Script , can someone show me how to add them in Pawno , if you can post a Pic. or give me a link show me how to do it please , i want to know where to put the codes under and these things


Re: FS problems :( - bhaveshnande - 27.02.2011

After you convert your MTA code into SA:MP format you need to put it in your gamemode or filterscript.

To put your objects in your gamemode refer this video
[ame]http://www.youtube.com/watch?v=MOo9G0ynLkc[/ame]
(Its at the end of this video)


And if you want to put them in your filterscript just click "New" button in PAWNO, remove the two slashes "//" before
//#define FILTERSCRIPT and put your objects in OnFilterScriptInit() below "{"


Re: FS problems :( - Mr.Black - 27.02.2011

This is what i did :

Quote:

// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT

#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("My First Map Filterscript ");
print("--------------------------------------\n");

//Converted objects and vehicles below!
CreateObject(987,1675.26037598,-1890.75793457,12.53043842,0.00000000,0.00000000,93 .31118774); //object(elecfence_bar) (2)
CreateObject(987,1674.50634766,-1879.08264160,12.39943218,0.00000000,0.00000000,19 2.96191406); //object(elecfence_bar) (3)
CreateObject(987,1662.94238281,-1881.80505371,12.34073067,0.00000000,0.73144531,18 3.03338623); //object(elecfence_bar) (4)
CreateObject(987,1650.98547363,-1882.44775391,12.20269012,0.00000000,0.73059082,18 1.04724121); //object(elecfence_bar) (5)
CreateObject(987,1639.10034180,-1882.62524414,12.07188225,0.00000000,0.73059082,18 1.06219482); //object(elecfence_bar) (6)
CreateObject(987,1613.43847656,-1882.44213867,12.53908157,0.00000000,0.72509766,18 0.81018066); //object(elecfence_bar) (7)
CreateObject(1223,1615.21069336,-1882.28552246,12.53908157,0.00000000,0.00000000,89 .73004150); //object(lampost_coast) (1)
CreateObject(1223,1625.56237793,-1882.47131348,12.54777527,0.00000000,0.00000000,89 .72534180); //object(lampost_coast) (2)
CreateObject(967,1614.20996094,-1881.56774902,12.54687500,0.00000000,0.00000000,88 .86999512); //object(bar_gatebox01) (1)
CreateObject(1491,1613.44787598,-1882.34765625,12.42187691,0.00000000,0.00000000,89 .73001099); //object(gen_doorint01) (1)
CreateObject(17036,1630.71264648,-1908.51232910,12.55025864,0.00000000,0.00000000,1. 98498535); //object(cuntw_carport1_) (1)
CreateObject(17036,1635.14526367,-1908.37890625,12.55210400,0.00000000,0.00000000,1. 98303223); //object(cuntw_carport1_) (2)
CreateObject(17036,1639.53833008,-1908.23486328,12.55210400,0.00000000,0.00000000,1. 98303223); //object(cuntw_carport1_) (3)
CreateObject(17036,1612.81872559,-1894.92187500,12.54687500,0.00000000,0.00000000,1. 98303223); //object(cuntw_carport1_) (4)
CreateObject(17036,1617.20007324,-1894.76147461,12.54934120,0.00000000,0.00000000,1. 98303223); //object(cuntw_carport1_) (5)
CreateObject(17036,1621.60412598,-1894.60961914,12.54968643,0.00000000,0.00000000,1. 98303223); //object(cuntw_carport1_) (6)
CreateObject(1686,1624.06958008,-1896.69140625,12.50148582,0.00000000,0.00000000,0. 00000000); //object(petrolpumpnew) (1)
CreateObject(1686,1623.93615723,-1892.18981934,12.52496529,0.00000000,0.00000000,0. 00000000); //object(petrolpumpnew) (2)

/*
Objects converted: 18
Vehicles converted: 0
Vehicle models found: 0
return 1;
}

public OnFilterScriptExit()
{

and here what happened :


Quote:

D:\Ravens_Roleplay_0.3c\Raven's Roleplay 0.3c\filterscripts\lol.pwn(25 : error 001: expected token: "#endif", but found "-end of file-"
D:\Ravens_Roleplay_0.3c\Raven's Roleplay 0.3c\filterscripts\lol.pwn(25 : error 030: compound statement not closed at the end of file (started at line 11)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.




Re: FS problems :( - bhaveshnande - 27.02.2011

This is what you should do :

Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT

#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    //Converted objects and vehicles below!
	CreateObject(987,1675.26037598,-1890.75793457,12.53043842,0.00000000,0.00000000,93 .31118774); //object(elecfence_bar) (2)
	CreateObject(987,1674.50634766,-1879.08264160,12.39943218,0.00000000,0.00000000,19 2.96191406); //object(elecfence_bar) (3)
	CreateObject(987,1662.94238281,-1881.80505371,12.34073067,0.00000000,0.73144531,18 3.03338623); //object(elecfence_bar) (4)
	CreateObject(987,1650.98547363,-1882.44775391,12.20269012,0.00000000,0.73059082,18 1.04724121); //object(elecfence_bar) (5)
	CreateObject(987,1639.10034180,-1882.62524414,12.07188225,0.00000000,0.73059082,18 1.06219482); //object(elecfence_bar) (6)
	CreateObject(987,1613.43847656,-1882.44213867,12.53908157,0.00000000,0.72509766,18 0.81018066); //object(elecfence_bar) (7)
	CreateObject(1223,1615.21069336,-1882.28552246,12.53908157,0.00000000,0.00000000,89 .73004150); //object(lampost_coast) (1)
	CreateObject(1223,1625.56237793,-1882.47131348,12.54777527,0.00000000,0.00000000,89 .72534180); //object(lampost_coast) (2)
	CreateObject(967,1614.20996094,-1881.56774902,12.54687500,0.00000000,0.00000000,88 .86999512); //object(bar_gatebox01) (1)
	CreateObject(1491,1613.44787598,-1882.34765625,12.42187691,0.00000000,0.00000000,89 .73001099); //object(gen_doorint01) (1)
	CreateObject(17036,1630.71264648,-1908.51232910,12.55025864,0.00000000,0.00000000,1. 98498535); //object(cuntw_carport1_) (1)
	CreateObject(17036,1635.14526367,-1908.37890625,12.55210400,0.00000000,0.00000000,1. 98303223); //object(cuntw_carport1_) (2)
	CreateObject(17036,1639.53833008,-1908.23486328,12.55210400,0.00000000,0.00000000,1. 98303223); //object(cuntw_carport1_) (3)
	CreateObject(17036,1612.81872559,-1894.92187500,12.54687500,0.00000000,0.00000000,1. 98303223); //object(cuntw_carport1_) (4)
	CreateObject(17036,1617.20007324,-1894.76147461,12.54934120,0.00000000,0.00000000,1. 98303223); //object(cuntw_carport1_) (5)
	CreateObject(17036,1621.60412598,-1894.60961914,12.54968643,0.00000000,0.00000000,1. 98303223); //object(cuntw_carport1_) (6)
	CreateObject(1686,1624.06958008,-1896.69140625,12.50148582,0.00000000,0.00000000,0. 00000000); //object(petrolpumpnew) (1)
	CreateObject(1686,1623.93615723,-1892.18981934,12.52496529,0.00000000,0.00000000,0. 00000000); //object(petrolpumpnew) (2)

	print("\n--------------------------------------");
	print(" Blank Filterscript by your name here");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

#else

main()
{
	print("\n----------------------------------");
	print(" Blank Gamemode by your name here");
	print("----------------------------------\n");
}

#endif
You should not delete the main() and #endif if you are keeping the "if" statement. Also you missed a curly bracket "{" after OnFilterScriptInt