Filterscript static vehs+train
#1

Hi, im wana make static vehs in filterscript but where to add them?It dont appiers in server!
Код:
#include <a_samp>
#define COLOR_YELLOW2 0xF5DEB3AA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_PURPLE 0xC2A2DAFF
#if defined FILTERSCRIPT

public OnPlayerSpawn(playerid)
{
	SendClientMessage(playerid,COLOR_PURPLE,"You can start train job at Unity Station!");
	return 1;
}

public OnFilterScriptInit()
{
	AddStaticVehicle(538,1690.6956,-1953.7982,13.5469,90.7252,1,1);
	AddStaticVehicle(537,1766.6824,-1957.2683,13.5469,269.2007,1,1);
	return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/mycommand", cmdtext, true, 10) == 0)
	{
		// Do something here
		return 1;
	}
	return 0;
}
public OnFilterScriptExit()
{
	return 1;
}
#endif

public OnPlayerEnterCheckpoint(playerid)
{
	return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
	return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	return 1;
}
And do i need to add train like of parts(wagons)?? Becouse i want to make train set in Unity Station!
Reply
#2

The problem isn't in the vehicle, the whole FS won't load because you didn't define it as a filster script.
pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT

#include <a_samp>
#define COLOR_YELLOW2 0xF5DEB3AA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_PURPLE 0xC2A2DAFF

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" FS loaded");
    print("--------------------------------------\n");
    AddStaticVehicle(538,1690.6956,-1953.7982,13.5469,90.7252,1,1);
    AddStaticVehicle(537,1766.6824,-1957.2683,13.5469,269.2007,1,1);
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    return 1;
}

public OnPlayerConnect(playerid)
{
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    return 1;
}

public OnPlayerSpawn(playerid)
{
    SendClientMessage(playerid,COLOR_PURPLE,"You can start train job at Unity Station!");
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
        // Do something here
        return 1;
    }
    return 0;
}
Reply
#3

Quote:
Originally Posted by DaRk_RaiN
Посмотреть сообщение
The problem isn't in the vehicle, the whole FS won't load because you didn't define it as a filster script.
pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT

#include <a_samp>
#define COLOR_YELLOW2 0xF5DEB3AA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_PURPLE 0xC2A2DAFF

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" FS loaded");
    print("--------------------------------------\n");
    AddStaticVehicle(538,1690.6956,-1953.7982,13.5469,90.7252,1,1);
    AddStaticVehicle(537,1766.6824,-1957.2683,13.5469,269.2007,1,1);
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    return 1;
}

public OnPlayerConnect(playerid)
{
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    return 1;
}

public OnPlayerSpawn(playerid)
{
    SendClientMessage(playerid,COLOR_PURPLE,"You can start train job at Unity Station!");
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
        // Do something here
        return 1;
    }
    return 0;
}
Thank you!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)