OnVehicleMod, Filterscript
#1

OnVehicleMod doesn't work in filterscript

Gamemode:
Код:
#include <a_samp>

main()
{
}

public OnGameModeInit()
{
	AddVehicleComponent(AddStaticVehicle(411, 0.0, 0.0, 10.0, 0.0, 50, 254), 1010);
	return 1;
}
FS:
Код:
#include <a_samp>

public OnVehicleMod(playerid, vehicleid, componentid)
{
	print("lol");
	return 1;
}
Console:
Код:
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3a R4, ©2005-2009 SA-MP Team

[20:31:26] 
[20:31:26] Server Plugins
[20:31:26] --------------
[20:31:26] Loaded 0 plugins.

[20:31:26] 
[20:31:26] Filter Scripts
[20:31:26] ---------------
[20:31:26]  Loading filter script 'FS.amx'...
[20:31:26]  Loaded 1 filter scripts.

[20:31:26] Number of vehicle models: 1
I tested this with adding the component in OnPlayerConnect, but console shows the same. Does Somebody have an idea, how to fix it?
Reply
#2

Maybe there is an issue with timing while its in onplayerconnect.
Try driving into a mod shop and applying a mod.
Reply
#3

You cannot add a vehicle like that.
OnVehicleMod only returns something when you are inside the stylingshops (Transfender, Wheel Arch Angels, Loco Low Co) and are 'modding' your vehicle.
Reply
#4

But there was some script "Bad vehicle component anti crasher". So how did it worked if it didn't used OnVehicleMod
Reply
#5

Where is that? Havne't seen that before.
If they were adding a component outside of the modshops then they probably scripted it into whatever command they used to add the component.
Reply
#6

http://forum.sa-mp.com/index.php?topic=108016.0
Reply
#7

That mod is used inside the stylingshops, that's why it was working with OnVehicleMod
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)