How to add a map to my pwn. filterscript -
Teo124 - 15.06.2014
Hello Scripters
I need to know how to add a map using pwn. [FILTERSCRIPT]
I got
createdynamicobject
and
removebuildingplayer
Kindly help
Re : How to add a map to my pwn. filterscript -
DarkZeroX - 15.06.2014
You create a new pwn file you put in filterscript, then you put up
#include <a_samp>
#include <streamer>
you put the callback
PHP код:
public OnFilterscriptInit ()
{
return 1;
}
this callback you put all you're CreateObject (or CreateDynamiqueObject)
You create another callback
PHP код:
public OnPlayerConnect (playerid)
{
return 1;
}
this callback you put all you're RemoveObject
+1 If you're help I thank you: p
Re: How to add a map to my pwn. filterscript -
Twizted - 15.06.2014
I suppose you've made your map with JerneJL's editor, am I right? Anyway, If you haven't, you can directly convert your MTA:SA map format to SA:MP map format with
Delux GTA Map Converter. You will also need
streamer.inc by Incognito.
You're now able to add your map using this structure:
pawn Код:
public OnFilterscriptInit()
{
CreateDynamicObjectEx(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, Float:drawdistance = 0.0, Float:streamdistance = 200.0, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players);
//repeat the above for each and every object
return 1;
}
Re: How to add a map to my pwn. filterscript -
HeLiOn_PrImE - 15.06.2014
createdynamicobject is used by incognito's streamer plugin. You need to install it to you server so it can work.
Here's an example of a map script in pawn using this streamer:
PHP код:
#include <a_samp>
#include <streamer>
public OnFilterScriptInit() //when the script starts
{
CreateDynamicObject(654,1174.58129883,-2037.50842285,71.03858185,0.00000000,0.00000000,0.00000000);
CreateDynamicObject(654,1174.72155762,-2037.07385254,70.79953766,0.00000000,0.00000000,50.00000000);
CreateDynamicObject(727,1175.03857422,-2036.85888672,70.37965393,0.00000000,0.00000000,0.00000000);
CreateDynamicObject(727,1175.18627930,-2036.97387695,72.16234589,0.00000000,0.00000000,0.00000000);
CreateDynamicObject(664,1174.46826172,-2036.67236328,67.50781250,0.00000000,0.00000000,0.00000000);
//the objects above are created
...
...
...
}
public OnPlayerConnect(playerid) //when a player connects
{
RemoveBuildingForPlayer(playerid, 615, 0.0, 0.0, 0.0, 200.0);
return 1;
//it will remove the building for that player
}
Re: How to add a map to my pwn. filterscript -
Teo124 - 15.06.2014
THANKS GUYS ILL REP+ YOU
Re: How to add a map to my pwn. filterscript -
Teo124 - 15.06.2014
Код:
#include <a_samp>
#include <streamer>
public OnFilterScriptInit()
{
CREATE DYNAMICS HERE
.
.
.
.
return 1;
}
public OnPlayerConnect(playerid)
{
RemoveBuildingForPlayer(playerid, 615, 0.0, 0.0, 0.0, 200.0);
.
.
.
return 1;
}
Like this right?
Re : How to add a map to my pwn. filterscript -
DarkZeroX - 15.06.2014
Yes ! Good Luck !