How to add a map to my pwn. filterscript
#1

Hello Scripters
I need to know how to add a map using pwn. [FILTERSCRIPT]
I got
createdynamicobject
and
removebuildingplayer
Kindly help
Reply
#2

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

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;
}
Reply
#4

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(playerid6150.00.00.0200.0); 
    return 
1;
//it will remove the building for that player

Reply
#5

THANKS GUYS ILL REP+ YOU
Reply
#6

Код:
#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?
Reply
#7

Yes ! Good Luck !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)