De-attach a vehicle object.
#2

pawn Код:
if (strcmp(cmdtext, "/plsultan", true) == 0){
SetPVarInt(playerid, "sultan1", CreateObject( 18646,0,0,0,0,0,0,80)); // Sultan
AttachObjectToVehicle( sultan1, GetPlayerVehicleID(playerid), 0.500000, 0.299999, 0.800000, 0.000000, 0.000000, 0.000000 );
SetPVarInt(playerid, "sultan2",CreateObject( 18646,0,0,0,0,0,0,80)); // Sultan
AttachObjectToVehicle(GetPVarInt(playerid, "sultan2"), GetPlayerVehicleID(playerid), -0.500000, -0.799999, 0.800000, 0.000000, 0.000000, 0.000000 );
return 1;
}
And create command to remove the objects
pawn Код:
if (strcmp(cmdtext, "/remove", true) == 0)
{
DestroyObject(GetPVarInt(playerid, "sultan1"));
DestroyObject(GetPVarInt(playerid, "sultan2"));
return 1;
}
Reply


Messages In This Thread
De-attach a vehicle object. - by Johny32 - 01.12.2013, 16:41
Re: De-attach a vehicle object. - by SilentSoul - 01.12.2013, 16:48
Re: De-attach a vehicle object. - by Johny32 - 01.12.2013, 16:52

Forum Jump:


Users browsing this thread: 1 Guest(s)