AttachObjectToVehicle -
alimash - 17.07.2013
hello everyone
i need some help thank you
i need to add this object (978 ) near this vehicle (548 )
i road the wiki samp site but didn't work please help me to write this
please help me to write that filter script
thank you so much
Re: AttachObjectToVehicle -
SuperViper - 17.07.2013
Vehicle models are different from vehicle IDs. Each vehicle has a unique ID from 1 to 2000 along with a model ID from 400 to 612. Vehicle functions like this are used on vehicle IDs. You need to check when the vehicle spawns and then if the model is equal to what you need, attach the object to the vehicle ID.
Re: AttachObjectToVehicle -
alimash - 18.07.2013
oh sorry right i need object 978 near the vehicle 548
Re: AttachObjectToVehicle -
AdamCooper - 18.07.2013
pawn Код:
new carid = GetPlayerVehicleID(playerid);
SetPVarInt(playerid, "alimash",CreateObject(978,0,0,0,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "alimash"), carid, -0.004999, 0.544999, 0.264999, 0.000000, 0.000000, 0.000000);
Download "vae" filterscript to get the X Y Z
Re: AttachObjectToVehicle -
alimash - 18.07.2013
please stop jocking what is alimash in that script i want to learn how to write it
tell me what i need [ includes ]
please help me to write a true filter script thanks
Код:
C:\Users\win\Desktop\flight\New folder (2)\filterscripts\attach.pwn(37) : error 017: undefined symbol "playerid"
C:\Users\win\Desktop\flight\New folder (2)\filterscripts\attach.pwn(38) : warning 217: loose indentation
C:\Users\win\Desktop\flight\New folder (2)\filterscripts\attach.pwn(38) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Re: AttachObjectToVehicle -
alimash - 19.07.2013
Nobody can't teach me about this ?
Re: AttachObjectToVehicle -
Aliassassin123456 - 22.07.2013
Add these code on top of your script:
and add these code in public OnGameModeInit
pawn Код:
obj = CreateObject(978, 0.0, 0.0, 0.0, 0.00000, 0.00000, 0.00000);
veh = CreateVehicle(548, 0.0000, 0.0000, 5.2709, 0.0000, -1, -1, 100);
AttachObjectToVehicle(obj,veh,0.15643,6.84836,-1.21915,0.000, 0.000, 0.000);
and for enter this vehicle add this command in public OnPlayerCommandText
pawn Код:
if(!strcmp(cmdtext,"/entervehicle",true))
{
PutPlayerInVehicle(playerid,veh,0);
SCM(playerid,-1,"You have been teleported.");
return 1;
}
Re: AttachObjectToVehicle -
alimash - 23.07.2013
Thank you so much