05.04.2012, 04:22
Using 0.3e RC6;
This gave me a chance to try GetVehicleModelInfo. Seems to work great.
pawn Код:
COMMAND:siren(playerid, params[])
{
if (GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, -1, "You must be the driver of a vehicle to use this command.");
new objectid, vehicleid, Float:x, Float:y, Float:z;
vehicleid = GetPlayerVehicleID(playerid);
GetVehicleModelInfo(GetVehicleModel(vehicleid), VEHICLE_MODEL_INFO_SIZE, x, y, z);
objectid = CreateObject(18646, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
AttachObjectToVehicle(objectid, vehicleid, 0.0, 0.0, floatadd(floatdiv(z, 2.0), 0.05), 0.0, 0.0, 0.0);
return 1;
}