Posts: 105
Threads: 10
Joined: Apr 2013
Reputation:
0
17.07.2013, 20:04
(
Последний раз редактировалось alimash; 18.07.2013 в 07:58.
)
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
Posts: 1,177
Threads: 27
Joined: Sep 2011
Reputation:
0
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.
Posts: 105
Threads: 10
Joined: Apr 2013
Reputation:
0
oh sorry right i need object 978 near the vehicle 548
Posts: 201
Threads: 39
Joined: Oct 2011
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
Posts: 105
Threads: 10
Joined: Apr 2013
Reputation:
0
Nobody can't teach me about this ?
Posts: 232
Threads: 4
Joined: Apr 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;
}