Attach object - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Attach object (
/showthread.php?tid=596437)
Attach object -
StR_MaRy - 17.12.2015
hi guys i want to add attach object to a Police car with a siren
//this is the code
Код HTML:
police[7] = AddStaticVehicleEx(411,1526.3502,-1644.3448,5.5955,180.2262,0,1, 30000, 1);
new girofar1 = CreateObject(18646,0,0,-1000,0,0,0,100);
AttachObjectToVehicle(girofar1, police[7], -0.749999, 1.024999, 0.309999, 0.000000, 0.000000, 0.000000);
//and this is the error
Код HTML:
C:\Users\StR\Desktop\star-gaming\gamemodes\gamemode.pwn(4518) : warning 202: number of arguments does not match definition
//the line 4518 is from
Код HTML:
police[7] = AddStaticVehicleEx(411,1526.3502,-1644.3448,5.5955,180.2262,0,1, 30000, 1);
cause of ,1 at the end to activate that siren
Re: Attach object -
SickAttack - 17.12.2015
Read carefully:
number of arguments does not match definition
Example: The native has 5 parameters and you are only using 4 of them.
https://sampwiki.blast.hk/wiki/AttachObjectToVehicle
https://sampwiki.blast.hk/wiki/AddStaticVehicleEx
https://sampwiki.blast.hk/wiki/CreateObject
Re: Attach object -
N0FeaR - 17.12.2015
PHP код:
AttachObjectToVehicle(police[7], -0.749999, 1.024999, 0.309999, 0.000000, 0.000000, 0.000000);