Attach object
#1

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

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

PHP код:
AttachObjectToVehicle(police[7], -0.7499991.0249990.3099990.0000000.0000000.000000); 
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)